Line data Source code
1 : /* Generated by Cython 3.0.11 */
2 :
3 : #ifndef PY_SSIZE_T_CLEAN
4 : #define PY_SSIZE_T_CLEAN
5 : #endif /* PY_SSIZE_T_CLEAN */
6 : #if defined(CYTHON_LIMITED_API) && 0
7 : #ifndef Py_LIMITED_API
8 : #if CYTHON_LIMITED_API+0 > 0x03030000
9 : #define Py_LIMITED_API CYTHON_LIMITED_API
10 : #else
11 : #define Py_LIMITED_API 0x03030000
12 : #endif
13 : #endif
14 : #endif
15 :
16 : #include "Python.h"
17 : #ifndef Py_PYTHON_H
18 : #error Python headers needed to compile C extensions, please install development version of Python.
19 : #elif PY_VERSION_HEX < 0x02070000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
20 : #error Cython requires Python 2.7+ or Python 3.3+.
21 : #else
22 : #if defined(CYTHON_LIMITED_API) && CYTHON_LIMITED_API
23 : #define __PYX_EXTRA_ABI_MODULE_NAME "limited"
24 : #else
25 : #define __PYX_EXTRA_ABI_MODULE_NAME ""
26 : #endif
27 : #define CYTHON_ABI "3_0_11" __PYX_EXTRA_ABI_MODULE_NAME
28 : #define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI
29 : #define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "."
30 : #define CYTHON_HEX_VERSION 0x03000BF0
31 : #define CYTHON_FUTURE_DIVISION 1
32 : #include <stddef.h>
33 : #ifndef offsetof
34 : #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
35 : #endif
36 : #if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS)
37 : #ifndef __stdcall
38 : #define __stdcall
39 : #endif
40 : #ifndef __cdecl
41 : #define __cdecl
42 : #endif
43 : #ifndef __fastcall
44 : #define __fastcall
45 : #endif
46 : #endif
47 : #ifndef DL_IMPORT
48 : #define DL_IMPORT(t) t
49 : #endif
50 : #ifndef DL_EXPORT
51 : #define DL_EXPORT(t) t
52 : #endif
53 : #define __PYX_COMMA ,
54 : #ifndef HAVE_LONG_LONG
55 : #define HAVE_LONG_LONG
56 : #endif
57 : #ifndef PY_LONG_LONG
58 : #define PY_LONG_LONG LONG_LONG
59 : #endif
60 : #ifndef Py_HUGE_VAL
61 : #define Py_HUGE_VAL HUGE_VAL
62 : #endif
63 : #define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX
64 : #if defined(GRAALVM_PYTHON)
65 : /* For very preliminary testing purposes. Most variables are set the same as PyPy.
66 : The existence of this section does not imply that anything works or is even tested */
67 : #define CYTHON_COMPILING_IN_PYPY 0
68 : #define CYTHON_COMPILING_IN_CPYTHON 0
69 : #define CYTHON_COMPILING_IN_LIMITED_API 0
70 : #define CYTHON_COMPILING_IN_GRAAL 1
71 : #define CYTHON_COMPILING_IN_NOGIL 0
72 : #undef CYTHON_USE_TYPE_SLOTS
73 : #define CYTHON_USE_TYPE_SLOTS 0
74 : #undef CYTHON_USE_TYPE_SPECS
75 : #define CYTHON_USE_TYPE_SPECS 0
76 : #undef CYTHON_USE_PYTYPE_LOOKUP
77 : #define CYTHON_USE_PYTYPE_LOOKUP 0
78 : #if PY_VERSION_HEX < 0x03050000
79 : #undef CYTHON_USE_ASYNC_SLOTS
80 : #define CYTHON_USE_ASYNC_SLOTS 0
81 : #elif !defined(CYTHON_USE_ASYNC_SLOTS)
82 : #define CYTHON_USE_ASYNC_SLOTS 1
83 : #endif
84 : #undef CYTHON_USE_PYLIST_INTERNALS
85 : #define CYTHON_USE_PYLIST_INTERNALS 0
86 : #undef CYTHON_USE_UNICODE_INTERNALS
87 : #define CYTHON_USE_UNICODE_INTERNALS 0
88 : #undef CYTHON_USE_UNICODE_WRITER
89 : #define CYTHON_USE_UNICODE_WRITER 0
90 : #undef CYTHON_USE_PYLONG_INTERNALS
91 : #define CYTHON_USE_PYLONG_INTERNALS 0
92 : #undef CYTHON_AVOID_BORROWED_REFS
93 : #define CYTHON_AVOID_BORROWED_REFS 1
94 : #undef CYTHON_ASSUME_SAFE_MACROS
95 : #define CYTHON_ASSUME_SAFE_MACROS 0
96 : #undef CYTHON_UNPACK_METHODS
97 : #define CYTHON_UNPACK_METHODS 0
98 : #undef CYTHON_FAST_THREAD_STATE
99 : #define CYTHON_FAST_THREAD_STATE 0
100 : #undef CYTHON_FAST_GIL
101 : #define CYTHON_FAST_GIL 0
102 : #undef CYTHON_METH_FASTCALL
103 : #define CYTHON_METH_FASTCALL 0
104 : #undef CYTHON_FAST_PYCALL
105 : #define CYTHON_FAST_PYCALL 0
106 : #ifndef CYTHON_PEP487_INIT_SUBCLASS
107 : #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3)
108 : #endif
109 : #undef CYTHON_PEP489_MULTI_PHASE_INIT
110 : #define CYTHON_PEP489_MULTI_PHASE_INIT 1
111 : #undef CYTHON_USE_MODULE_STATE
112 : #define CYTHON_USE_MODULE_STATE 0
113 : #undef CYTHON_USE_TP_FINALIZE
114 : #define CYTHON_USE_TP_FINALIZE 0
115 : #undef CYTHON_USE_DICT_VERSIONS
116 : #define CYTHON_USE_DICT_VERSIONS 0
117 : #undef CYTHON_USE_EXC_INFO_STACK
118 : #define CYTHON_USE_EXC_INFO_STACK 0
119 : #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
120 : #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
121 : #endif
122 : #undef CYTHON_USE_FREELISTS
123 : #define CYTHON_USE_FREELISTS 0
124 : #elif defined(PYPY_VERSION)
125 : #define CYTHON_COMPILING_IN_PYPY 1
126 : #define CYTHON_COMPILING_IN_CPYTHON 0
127 : #define CYTHON_COMPILING_IN_LIMITED_API 0
128 : #define CYTHON_COMPILING_IN_GRAAL 0
129 : #define CYTHON_COMPILING_IN_NOGIL 0
130 : #undef CYTHON_USE_TYPE_SLOTS
131 : #define CYTHON_USE_TYPE_SLOTS 0
132 : #ifndef CYTHON_USE_TYPE_SPECS
133 : #define CYTHON_USE_TYPE_SPECS 0
134 : #endif
135 : #undef CYTHON_USE_PYTYPE_LOOKUP
136 : #define CYTHON_USE_PYTYPE_LOOKUP 0
137 : #if PY_VERSION_HEX < 0x03050000
138 : #undef CYTHON_USE_ASYNC_SLOTS
139 : #define CYTHON_USE_ASYNC_SLOTS 0
140 : #elif !defined(CYTHON_USE_ASYNC_SLOTS)
141 : #define CYTHON_USE_ASYNC_SLOTS 1
142 : #endif
143 : #undef CYTHON_USE_PYLIST_INTERNALS
144 : #define CYTHON_USE_PYLIST_INTERNALS 0
145 : #undef CYTHON_USE_UNICODE_INTERNALS
146 : #define CYTHON_USE_UNICODE_INTERNALS 0
147 : #undef CYTHON_USE_UNICODE_WRITER
148 : #define CYTHON_USE_UNICODE_WRITER 0
149 : #undef CYTHON_USE_PYLONG_INTERNALS
150 : #define CYTHON_USE_PYLONG_INTERNALS 0
151 : #undef CYTHON_AVOID_BORROWED_REFS
152 : #define CYTHON_AVOID_BORROWED_REFS 1
153 : #undef CYTHON_ASSUME_SAFE_MACROS
154 : #define CYTHON_ASSUME_SAFE_MACROS 0
155 : #undef CYTHON_UNPACK_METHODS
156 : #define CYTHON_UNPACK_METHODS 0
157 : #undef CYTHON_FAST_THREAD_STATE
158 : #define CYTHON_FAST_THREAD_STATE 0
159 : #undef CYTHON_FAST_GIL
160 : #define CYTHON_FAST_GIL 0
161 : #undef CYTHON_METH_FASTCALL
162 : #define CYTHON_METH_FASTCALL 0
163 : #undef CYTHON_FAST_PYCALL
164 : #define CYTHON_FAST_PYCALL 0
165 : #ifndef CYTHON_PEP487_INIT_SUBCLASS
166 : #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3)
167 : #endif
168 : #if PY_VERSION_HEX < 0x03090000
169 : #undef CYTHON_PEP489_MULTI_PHASE_INIT
170 : #define CYTHON_PEP489_MULTI_PHASE_INIT 0
171 : #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT)
172 : #define CYTHON_PEP489_MULTI_PHASE_INIT 1
173 : #endif
174 : #undef CYTHON_USE_MODULE_STATE
175 : #define CYTHON_USE_MODULE_STATE 0
176 : #undef CYTHON_USE_TP_FINALIZE
177 : #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1 && PYPY_VERSION_NUM >= 0x07030C00)
178 : #undef CYTHON_USE_DICT_VERSIONS
179 : #define CYTHON_USE_DICT_VERSIONS 0
180 : #undef CYTHON_USE_EXC_INFO_STACK
181 : #define CYTHON_USE_EXC_INFO_STACK 0
182 : #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
183 : #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
184 : #endif
185 : #undef CYTHON_USE_FREELISTS
186 : #define CYTHON_USE_FREELISTS 0
187 : #elif defined(CYTHON_LIMITED_API)
188 : #ifdef Py_LIMITED_API
189 : #undef __PYX_LIMITED_VERSION_HEX
190 : #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API
191 : #endif
192 : #define CYTHON_COMPILING_IN_PYPY 0
193 : #define CYTHON_COMPILING_IN_CPYTHON 0
194 : #define CYTHON_COMPILING_IN_LIMITED_API 1
195 : #define CYTHON_COMPILING_IN_GRAAL 0
196 : #define CYTHON_COMPILING_IN_NOGIL 0
197 : #undef CYTHON_CLINE_IN_TRACEBACK
198 : #define CYTHON_CLINE_IN_TRACEBACK 0
199 : #undef CYTHON_USE_TYPE_SLOTS
200 : #define CYTHON_USE_TYPE_SLOTS 0
201 : #undef CYTHON_USE_TYPE_SPECS
202 : #define CYTHON_USE_TYPE_SPECS 1
203 : #undef CYTHON_USE_PYTYPE_LOOKUP
204 : #define CYTHON_USE_PYTYPE_LOOKUP 0
205 : #undef CYTHON_USE_ASYNC_SLOTS
206 : #define CYTHON_USE_ASYNC_SLOTS 0
207 : #undef CYTHON_USE_PYLIST_INTERNALS
208 : #define CYTHON_USE_PYLIST_INTERNALS 0
209 : #undef CYTHON_USE_UNICODE_INTERNALS
210 : #define CYTHON_USE_UNICODE_INTERNALS 0
211 : #ifndef CYTHON_USE_UNICODE_WRITER
212 : #define CYTHON_USE_UNICODE_WRITER 0
213 : #endif
214 : #undef CYTHON_USE_PYLONG_INTERNALS
215 : #define CYTHON_USE_PYLONG_INTERNALS 0
216 : #ifndef CYTHON_AVOID_BORROWED_REFS
217 : #define CYTHON_AVOID_BORROWED_REFS 0
218 : #endif
219 : #undef CYTHON_ASSUME_SAFE_MACROS
220 : #define CYTHON_ASSUME_SAFE_MACROS 0
221 : #undef CYTHON_UNPACK_METHODS
222 : #define CYTHON_UNPACK_METHODS 0
223 : #undef CYTHON_FAST_THREAD_STATE
224 : #define CYTHON_FAST_THREAD_STATE 0
225 : #undef CYTHON_FAST_GIL
226 : #define CYTHON_FAST_GIL 0
227 : #undef CYTHON_METH_FASTCALL
228 : #define CYTHON_METH_FASTCALL 0
229 : #undef CYTHON_FAST_PYCALL
230 : #define CYTHON_FAST_PYCALL 0
231 : #ifndef CYTHON_PEP487_INIT_SUBCLASS
232 : #define CYTHON_PEP487_INIT_SUBCLASS 1
233 : #endif
234 : #undef CYTHON_PEP489_MULTI_PHASE_INIT
235 : #define CYTHON_PEP489_MULTI_PHASE_INIT 0
236 : #undef CYTHON_USE_MODULE_STATE
237 : #define CYTHON_USE_MODULE_STATE 1
238 : #ifndef CYTHON_USE_TP_FINALIZE
239 : #define CYTHON_USE_TP_FINALIZE 0
240 : #endif
241 : #undef CYTHON_USE_DICT_VERSIONS
242 : #define CYTHON_USE_DICT_VERSIONS 0
243 : #undef CYTHON_USE_EXC_INFO_STACK
244 : #define CYTHON_USE_EXC_INFO_STACK 0
245 : #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
246 : #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
247 : #endif
248 : #undef CYTHON_USE_FREELISTS
249 : #define CYTHON_USE_FREELISTS 0
250 : #elif defined(Py_GIL_DISABLED) || defined(Py_NOGIL)
251 : #define CYTHON_COMPILING_IN_PYPY 0
252 : #define CYTHON_COMPILING_IN_CPYTHON 0
253 : #define CYTHON_COMPILING_IN_LIMITED_API 0
254 : #define CYTHON_COMPILING_IN_GRAAL 0
255 : #define CYTHON_COMPILING_IN_NOGIL 1
256 : #ifndef CYTHON_USE_TYPE_SLOTS
257 : #define CYTHON_USE_TYPE_SLOTS 1
258 : #endif
259 : #ifndef CYTHON_USE_TYPE_SPECS
260 : #define CYTHON_USE_TYPE_SPECS 0
261 : #endif
262 : #undef CYTHON_USE_PYTYPE_LOOKUP
263 : #define CYTHON_USE_PYTYPE_LOOKUP 0
264 : #ifndef CYTHON_USE_ASYNC_SLOTS
265 : #define CYTHON_USE_ASYNC_SLOTS 1
266 : #endif
267 : #ifndef CYTHON_USE_PYLONG_INTERNALS
268 : #define CYTHON_USE_PYLONG_INTERNALS 0
269 : #endif
270 : #undef CYTHON_USE_PYLIST_INTERNALS
271 : #define CYTHON_USE_PYLIST_INTERNALS 0
272 : #ifndef CYTHON_USE_UNICODE_INTERNALS
273 : #define CYTHON_USE_UNICODE_INTERNALS 1
274 : #endif
275 : #undef CYTHON_USE_UNICODE_WRITER
276 : #define CYTHON_USE_UNICODE_WRITER 0
277 : #ifndef CYTHON_AVOID_BORROWED_REFS
278 : #define CYTHON_AVOID_BORROWED_REFS 0
279 : #endif
280 : #ifndef CYTHON_ASSUME_SAFE_MACROS
281 : #define CYTHON_ASSUME_SAFE_MACROS 1
282 : #endif
283 : #ifndef CYTHON_UNPACK_METHODS
284 : #define CYTHON_UNPACK_METHODS 1
285 : #endif
286 : #undef CYTHON_FAST_THREAD_STATE
287 : #define CYTHON_FAST_THREAD_STATE 0
288 : #undef CYTHON_FAST_GIL
289 : #define CYTHON_FAST_GIL 0
290 : #ifndef CYTHON_METH_FASTCALL
291 : #define CYTHON_METH_FASTCALL 1
292 : #endif
293 : #undef CYTHON_FAST_PYCALL
294 : #define CYTHON_FAST_PYCALL 0
295 : #ifndef CYTHON_PEP487_INIT_SUBCLASS
296 : #define CYTHON_PEP487_INIT_SUBCLASS 1
297 : #endif
298 : #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
299 : #define CYTHON_PEP489_MULTI_PHASE_INIT 1
300 : #endif
301 : #ifndef CYTHON_USE_MODULE_STATE
302 : #define CYTHON_USE_MODULE_STATE 0
303 : #endif
304 : #ifndef CYTHON_USE_TP_FINALIZE
305 : #define CYTHON_USE_TP_FINALIZE 1
306 : #endif
307 : #undef CYTHON_USE_DICT_VERSIONS
308 : #define CYTHON_USE_DICT_VERSIONS 0
309 : #undef CYTHON_USE_EXC_INFO_STACK
310 : #define CYTHON_USE_EXC_INFO_STACK 0
311 : #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
312 : #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
313 : #endif
314 : #ifndef CYTHON_USE_FREELISTS
315 : #define CYTHON_USE_FREELISTS 0
316 : #endif
317 : #else
318 : #define CYTHON_COMPILING_IN_PYPY 0
319 : #define CYTHON_COMPILING_IN_CPYTHON 1
320 : #define CYTHON_COMPILING_IN_LIMITED_API 0
321 : #define CYTHON_COMPILING_IN_GRAAL 0
322 : #define CYTHON_COMPILING_IN_NOGIL 0
323 : #ifndef CYTHON_USE_TYPE_SLOTS
324 : #define CYTHON_USE_TYPE_SLOTS 1
325 : #endif
326 : #ifndef CYTHON_USE_TYPE_SPECS
327 : #define CYTHON_USE_TYPE_SPECS 0
328 : #endif
329 : #ifndef CYTHON_USE_PYTYPE_LOOKUP
330 : #define CYTHON_USE_PYTYPE_LOOKUP 1
331 : #endif
332 : #if PY_MAJOR_VERSION < 3
333 : #undef CYTHON_USE_ASYNC_SLOTS
334 : #define CYTHON_USE_ASYNC_SLOTS 0
335 : #elif !defined(CYTHON_USE_ASYNC_SLOTS)
336 : #define CYTHON_USE_ASYNC_SLOTS 1
337 : #endif
338 : #ifndef CYTHON_USE_PYLONG_INTERNALS
339 : #define CYTHON_USE_PYLONG_INTERNALS 1
340 : #endif
341 : #ifndef CYTHON_USE_PYLIST_INTERNALS
342 : #define CYTHON_USE_PYLIST_INTERNALS 1
343 : #endif
344 : #ifndef CYTHON_USE_UNICODE_INTERNALS
345 : #define CYTHON_USE_UNICODE_INTERNALS 1
346 : #endif
347 : #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2
348 : #undef CYTHON_USE_UNICODE_WRITER
349 : #define CYTHON_USE_UNICODE_WRITER 0
350 : #elif !defined(CYTHON_USE_UNICODE_WRITER)
351 : #define CYTHON_USE_UNICODE_WRITER 1
352 : #endif
353 : #ifndef CYTHON_AVOID_BORROWED_REFS
354 : #define CYTHON_AVOID_BORROWED_REFS 0
355 : #endif
356 : #ifndef CYTHON_ASSUME_SAFE_MACROS
357 : #define CYTHON_ASSUME_SAFE_MACROS 1
358 : #endif
359 : #ifndef CYTHON_UNPACK_METHODS
360 : #define CYTHON_UNPACK_METHODS 1
361 : #endif
362 : #ifndef CYTHON_FAST_THREAD_STATE
363 : #define CYTHON_FAST_THREAD_STATE 1
364 : #endif
365 : #ifndef CYTHON_FAST_GIL
366 : #define CYTHON_FAST_GIL (PY_MAJOR_VERSION < 3 || PY_VERSION_HEX >= 0x03060000 && PY_VERSION_HEX < 0x030C00A6)
367 : #endif
368 : #ifndef CYTHON_METH_FASTCALL
369 : #define CYTHON_METH_FASTCALL (PY_VERSION_HEX >= 0x030700A1)
370 : #endif
371 : #ifndef CYTHON_FAST_PYCALL
372 : #define CYTHON_FAST_PYCALL 1
373 : #endif
374 : #ifndef CYTHON_PEP487_INIT_SUBCLASS
375 : #define CYTHON_PEP487_INIT_SUBCLASS 1
376 : #endif
377 : #if PY_VERSION_HEX < 0x03050000
378 : #undef CYTHON_PEP489_MULTI_PHASE_INIT
379 : #define CYTHON_PEP489_MULTI_PHASE_INIT 0
380 : #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT)
381 : #define CYTHON_PEP489_MULTI_PHASE_INIT 1
382 : #endif
383 : #ifndef CYTHON_USE_MODULE_STATE
384 : #define CYTHON_USE_MODULE_STATE 0
385 : #endif
386 : #if PY_VERSION_HEX < 0x030400a1
387 : #undef CYTHON_USE_TP_FINALIZE
388 : #define CYTHON_USE_TP_FINALIZE 0
389 : #elif !defined(CYTHON_USE_TP_FINALIZE)
390 : #define CYTHON_USE_TP_FINALIZE 1
391 : #endif
392 : #if PY_VERSION_HEX < 0x030600B1
393 : #undef CYTHON_USE_DICT_VERSIONS
394 : #define CYTHON_USE_DICT_VERSIONS 0
395 : #elif !defined(CYTHON_USE_DICT_VERSIONS)
396 : #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5)
397 : #endif
398 : #if PY_VERSION_HEX < 0x030700A3
399 : #undef CYTHON_USE_EXC_INFO_STACK
400 : #define CYTHON_USE_EXC_INFO_STACK 0
401 : #elif !defined(CYTHON_USE_EXC_INFO_STACK)
402 : #define CYTHON_USE_EXC_INFO_STACK 1
403 : #endif
404 : #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
405 : #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
406 : #endif
407 : #ifndef CYTHON_USE_FREELISTS
408 : #define CYTHON_USE_FREELISTS 1
409 : #endif
410 : #endif
411 : #if !defined(CYTHON_FAST_PYCCALL)
412 : #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
413 : #endif
414 : #if !defined(CYTHON_VECTORCALL)
415 : #define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1)
416 : #endif
417 : #define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1)
418 : #if CYTHON_USE_PYLONG_INTERNALS
419 : #if PY_MAJOR_VERSION < 3
420 : #include "longintrepr.h"
421 : #endif
422 : #undef SHIFT
423 : #undef BASE
424 : #undef MASK
425 : #ifdef SIZEOF_VOID_P
426 : enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
427 : #endif
428 : #endif
429 : #ifndef __has_attribute
430 : #define __has_attribute(x) 0
431 : #endif
432 : #ifndef __has_cpp_attribute
433 : #define __has_cpp_attribute(x) 0
434 : #endif
435 : #ifndef CYTHON_RESTRICT
436 : #if defined(__GNUC__)
437 : #define CYTHON_RESTRICT __restrict__
438 : #elif defined(_MSC_VER) && _MSC_VER >= 1400
439 : #define CYTHON_RESTRICT __restrict
440 : #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
441 : #define CYTHON_RESTRICT restrict
442 : #else
443 : #define CYTHON_RESTRICT
444 : #endif
445 : #endif
446 : #ifndef CYTHON_UNUSED
447 : #if defined(__cplusplus)
448 : /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17
449 : * but leads to warnings with -pedantic, since it is a C++17 feature */
450 : #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
451 : #if __has_cpp_attribute(maybe_unused)
452 : #define CYTHON_UNUSED [[maybe_unused]]
453 : #endif
454 : #endif
455 : #endif
456 : #endif
457 : #ifndef CYTHON_UNUSED
458 : # if defined(__GNUC__)
459 : # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
460 : # define CYTHON_UNUSED __attribute__ ((__unused__))
461 : # else
462 : # define CYTHON_UNUSED
463 : # endif
464 : # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
465 : # define CYTHON_UNUSED __attribute__ ((__unused__))
466 : # else
467 : # define CYTHON_UNUSED
468 : # endif
469 : #endif
470 : #ifndef CYTHON_UNUSED_VAR
471 : # if defined(__cplusplus)
472 : template<class T> void CYTHON_UNUSED_VAR( const T& ) { }
473 : # else
474 : # define CYTHON_UNUSED_VAR(x) (void)(x)
475 : # endif
476 : #endif
477 : #ifndef CYTHON_MAYBE_UNUSED_VAR
478 : #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x)
479 : #endif
480 : #ifndef CYTHON_NCP_UNUSED
481 : # if CYTHON_COMPILING_IN_CPYTHON
482 : # define CYTHON_NCP_UNUSED
483 : # else
484 : # define CYTHON_NCP_UNUSED CYTHON_UNUSED
485 : # endif
486 : #endif
487 : #ifndef CYTHON_USE_CPP_STD_MOVE
488 : #if defined(__cplusplus) && (\
489 : __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600))
490 : #define CYTHON_USE_CPP_STD_MOVE 1
491 : #else
492 : #define CYTHON_USE_CPP_STD_MOVE 0
493 : #endif
494 : #endif
495 : #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
496 : #ifdef _MSC_VER
497 : #ifndef _MSC_STDINT_H_
498 : #if _MSC_VER < 1300
499 : typedef unsigned char uint8_t;
500 : typedef unsigned short uint16_t;
501 : typedef unsigned int uint32_t;
502 : #else
503 : typedef unsigned __int8 uint8_t;
504 : typedef unsigned __int16 uint16_t;
505 : typedef unsigned __int32 uint32_t;
506 : #endif
507 : #endif
508 : #if _MSC_VER < 1300
509 : #ifdef _WIN64
510 : typedef unsigned long long __pyx_uintptr_t;
511 : #else
512 : typedef unsigned int __pyx_uintptr_t;
513 : #endif
514 : #else
515 : #ifdef _WIN64
516 : typedef unsigned __int64 __pyx_uintptr_t;
517 : #else
518 : typedef unsigned __int32 __pyx_uintptr_t;
519 : #endif
520 : #endif
521 : #else
522 : #include <stdint.h>
523 : typedef uintptr_t __pyx_uintptr_t;
524 : #endif
525 : #ifndef CYTHON_FALLTHROUGH
526 : #if defined(__cplusplus)
527 : /* for clang __has_cpp_attribute(fallthrough) is true even before C++17
528 : * but leads to warnings with -pedantic, since it is a C++17 feature */
529 : #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
530 : #if __has_cpp_attribute(fallthrough)
531 : #define CYTHON_FALLTHROUGH [[fallthrough]]
532 : #endif
533 : #endif
534 : #ifndef CYTHON_FALLTHROUGH
535 : #if __has_cpp_attribute(clang::fallthrough)
536 : #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
537 : #elif __has_cpp_attribute(gnu::fallthrough)
538 : #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
539 : #endif
540 : #endif
541 : #endif
542 : #ifndef CYTHON_FALLTHROUGH
543 : #if __has_attribute(fallthrough)
544 : #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
545 : #else
546 : #define CYTHON_FALLTHROUGH
547 : #endif
548 : #endif
549 : #if defined(__clang__) && defined(__apple_build_version__)
550 : #if __apple_build_version__ < 7000000
551 : #undef CYTHON_FALLTHROUGH
552 : #define CYTHON_FALLTHROUGH
553 : #endif
554 : #endif
555 : #endif
556 : #ifdef __cplusplus
557 : template <typename T>
558 : struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);};
559 : #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL<type>::value)
560 : #else
561 : #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0)
562 : #endif
563 : #if CYTHON_COMPILING_IN_PYPY == 1
564 : #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x030A0000)
565 : #else
566 : #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000)
567 : #endif
568 : #define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer))
569 :
570 : #ifndef CYTHON_INLINE
571 : #if defined(__clang__)
572 : #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
573 : #elif defined(__GNUC__)
574 : #define CYTHON_INLINE __inline__
575 : #elif defined(_MSC_VER)
576 : #define CYTHON_INLINE __inline
577 : #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
578 : #define CYTHON_INLINE inline
579 : #else
580 : #define CYTHON_INLINE
581 : #endif
582 : #endif
583 :
584 : #define __PYX_BUILD_PY_SSIZE_T "n"
585 : #define CYTHON_FORMAT_SSIZE_T "z"
586 : #if PY_MAJOR_VERSION < 3
587 : #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
588 : #define __Pyx_DefaultClassType PyClass_Type
589 : #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
590 : PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
591 : #else
592 : #define __Pyx_BUILTIN_MODULE_NAME "builtins"
593 : #define __Pyx_DefaultClassType PyType_Type
594 : #if CYTHON_COMPILING_IN_LIMITED_API
595 : static CYTHON_INLINE PyObject* __Pyx_PyCode_New(int a, int p, int k, int l, int s, int f,
596 : PyObject *code, PyObject *c, PyObject* n, PyObject *v,
597 : PyObject *fv, PyObject *cell, PyObject* fn,
598 : PyObject *name, int fline, PyObject *lnos) {
599 : PyObject *exception_table = NULL;
600 : PyObject *types_module=NULL, *code_type=NULL, *result=NULL;
601 : #if __PYX_LIMITED_VERSION_HEX < 0x030B0000
602 : PyObject *version_info;
603 : PyObject *py_minor_version = NULL;
604 : #endif
605 : long minor_version = 0;
606 : PyObject *type, *value, *traceback;
607 : PyErr_Fetch(&type, &value, &traceback);
608 : #if __PYX_LIMITED_VERSION_HEX >= 0x030B0000
609 : minor_version = 11;
610 : #else
611 : if (!(version_info = PySys_GetObject("version_info"))) goto end;
612 : if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end;
613 : minor_version = PyLong_AsLong(py_minor_version);
614 : Py_DECREF(py_minor_version);
615 : if (minor_version == -1 && PyErr_Occurred()) goto end;
616 : #endif
617 : if (!(types_module = PyImport_ImportModule("types"))) goto end;
618 : if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end;
619 : if (minor_version <= 7) {
620 : (void)p;
621 : result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOO", a, k, l, s, f, code,
622 : c, n, v, fn, name, fline, lnos, fv, cell);
623 : } else if (minor_version <= 10) {
624 : result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOO", a,p, k, l, s, f, code,
625 : c, n, v, fn, name, fline, lnos, fv, cell);
626 : } else {
627 : if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end;
628 : result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOO", a,p, k, l, s, f, code,
629 : c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell);
630 : }
631 : end:
632 : Py_XDECREF(code_type);
633 : Py_XDECREF(exception_table);
634 : Py_XDECREF(types_module);
635 : if (type) {
636 : PyErr_Restore(type, value, traceback);
637 : }
638 : return result;
639 : }
640 : #ifndef CO_OPTIMIZED
641 : #define CO_OPTIMIZED 0x0001
642 : #endif
643 : #ifndef CO_NEWLOCALS
644 : #define CO_NEWLOCALS 0x0002
645 : #endif
646 : #ifndef CO_VARARGS
647 : #define CO_VARARGS 0x0004
648 : #endif
649 : #ifndef CO_VARKEYWORDS
650 : #define CO_VARKEYWORDS 0x0008
651 : #endif
652 : #ifndef CO_ASYNC_GENERATOR
653 : #define CO_ASYNC_GENERATOR 0x0200
654 : #endif
655 : #ifndef CO_GENERATOR
656 : #define CO_GENERATOR 0x0020
657 : #endif
658 : #ifndef CO_COROUTINE
659 : #define CO_COROUTINE 0x0080
660 : #endif
661 : #elif PY_VERSION_HEX >= 0x030B0000
662 48 : static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int p, int k, int l, int s, int f,
663 : PyObject *code, PyObject *c, PyObject* n, PyObject *v,
664 : PyObject *fv, PyObject *cell, PyObject* fn,
665 : PyObject *name, int fline, PyObject *lnos) {
666 48 : PyCodeObject *result;
667 48 : PyObject *empty_bytes = PyBytes_FromStringAndSize("", 0);
668 48 : if (!empty_bytes) return NULL;
669 48 : result =
670 : #if PY_VERSION_HEX >= 0x030C0000
671 48 : PyUnstable_Code_NewWithPosOnlyArgs
672 : #else
673 : PyCode_NewWithPosOnlyArgs
674 : #endif
675 : (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, empty_bytes);
676 48 : Py_DECREF(empty_bytes);
677 : return result;
678 : }
679 : #elif PY_VERSION_HEX >= 0x030800B2 && !CYTHON_COMPILING_IN_PYPY
680 : #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
681 : PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
682 : #else
683 : #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
684 : PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
685 : #endif
686 : #endif
687 : #if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE)
688 : #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type)
689 : #else
690 : #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type))
691 : #endif
692 : #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is)
693 : #define __Pyx_Py_Is(x, y) Py_Is(x, y)
694 : #else
695 : #define __Pyx_Py_Is(x, y) ((x) == (y))
696 : #endif
697 : #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone)
698 : #define __Pyx_Py_IsNone(ob) Py_IsNone(ob)
699 : #else
700 : #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None)
701 : #endif
702 : #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue)
703 : #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob)
704 : #else
705 : #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True)
706 : #endif
707 : #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse)
708 : #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob)
709 : #else
710 : #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False)
711 : #endif
712 : #define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj))
713 : #if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY
714 : #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o)
715 : #else
716 : #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o)
717 : #endif
718 : #ifndef CO_COROUTINE
719 : #define CO_COROUTINE 0x80
720 : #endif
721 : #ifndef CO_ASYNC_GENERATOR
722 : #define CO_ASYNC_GENERATOR 0x200
723 : #endif
724 : #ifndef Py_TPFLAGS_CHECKTYPES
725 : #define Py_TPFLAGS_CHECKTYPES 0
726 : #endif
727 : #ifndef Py_TPFLAGS_HAVE_INDEX
728 : #define Py_TPFLAGS_HAVE_INDEX 0
729 : #endif
730 : #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
731 : #define Py_TPFLAGS_HAVE_NEWBUFFER 0
732 : #endif
733 : #ifndef Py_TPFLAGS_HAVE_FINALIZE
734 : #define Py_TPFLAGS_HAVE_FINALIZE 0
735 : #endif
736 : #ifndef Py_TPFLAGS_SEQUENCE
737 : #define Py_TPFLAGS_SEQUENCE 0
738 : #endif
739 : #ifndef Py_TPFLAGS_MAPPING
740 : #define Py_TPFLAGS_MAPPING 0
741 : #endif
742 : #ifndef METH_STACKLESS
743 : #define METH_STACKLESS 0
744 : #endif
745 : #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
746 : #ifndef METH_FASTCALL
747 : #define METH_FASTCALL 0x80
748 : #endif
749 : typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
750 : typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
751 : Py_ssize_t nargs, PyObject *kwnames);
752 : #else
753 : #if PY_VERSION_HEX >= 0x030d00A4
754 : # define __Pyx_PyCFunctionFast PyCFunctionFast
755 : # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords
756 : #else
757 : # define __Pyx_PyCFunctionFast _PyCFunctionFast
758 : # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
759 : #endif
760 : #endif
761 : #if CYTHON_METH_FASTCALL
762 : #define __Pyx_METH_FASTCALL METH_FASTCALL
763 : #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast
764 : #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords
765 : #else
766 : #define __Pyx_METH_FASTCALL METH_VARARGS
767 : #define __Pyx_PyCFunction_FastCall PyCFunction
768 : #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords
769 : #endif
770 : #if CYTHON_VECTORCALL
771 : #define __pyx_vectorcallfunc vectorcallfunc
772 : #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET
773 : #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n))
774 : #elif CYTHON_BACKPORT_VECTORCALL
775 : typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args,
776 : size_t nargsf, PyObject *kwnames);
777 : #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET ((size_t)1 << (8 * sizeof(size_t) - 1))
778 : #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(((size_t)(n)) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET))
779 : #else
780 : #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0
781 : #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n))
782 : #endif
783 : #if PY_MAJOR_VERSION >= 0x030900B1
784 : #define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func)
785 : #else
786 : #define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func)
787 : #endif
788 : #define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func)
789 : #if CYTHON_COMPILING_IN_CPYTHON
790 : #define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth)
791 : #elif !CYTHON_COMPILING_IN_LIMITED_API
792 : #define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func)
793 : #endif
794 : #if CYTHON_COMPILING_IN_CPYTHON
795 : #define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags)
796 0 : static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) {
797 0 : return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self;
798 : }
799 : #endif
800 : static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void *cfunc) {
801 : #if CYTHON_COMPILING_IN_LIMITED_API
802 : return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
803 : #else
804 : return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
805 : #endif
806 : }
807 : #define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc)
808 : #if __PYX_LIMITED_VERSION_HEX < 0x030900B1
809 : #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b))
810 : typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *);
811 : #else
812 : #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b)
813 : #define __Pyx_PyCMethod PyCMethod
814 : #endif
815 : #ifndef METH_METHOD
816 : #define METH_METHOD 0x200
817 : #endif
818 : #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
819 : #define PyObject_Malloc(s) PyMem_Malloc(s)
820 : #define PyObject_Free(p) PyMem_Free(p)
821 : #define PyObject_Realloc(p) PyMem_Realloc(p)
822 : #endif
823 : #if CYTHON_COMPILING_IN_LIMITED_API
824 : #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
825 : #define __Pyx_PyFrame_SetLineNumber(frame, lineno)
826 : #else
827 : #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
828 : #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
829 : #endif
830 : #if CYTHON_COMPILING_IN_LIMITED_API
831 : #define __Pyx_PyThreadState_Current PyThreadState_Get()
832 : #elif !CYTHON_FAST_THREAD_STATE
833 : #define __Pyx_PyThreadState_Current PyThreadState_GET()
834 : #elif PY_VERSION_HEX >= 0x030d00A1
835 : #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked()
836 : #elif PY_VERSION_HEX >= 0x03060000
837 : #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
838 : #elif PY_VERSION_HEX >= 0x03000000
839 : #define __Pyx_PyThreadState_Current PyThreadState_GET()
840 : #else
841 : #define __Pyx_PyThreadState_Current _PyThreadState_Current
842 : #endif
843 : #if CYTHON_COMPILING_IN_LIMITED_API
844 : static CYTHON_INLINE void *__Pyx_PyModule_GetState(PyObject *op)
845 : {
846 : void *result;
847 : result = PyModule_GetState(op);
848 : if (!result)
849 : Py_FatalError("Couldn't find the module state");
850 : return result;
851 : }
852 : #endif
853 : #define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE(obj), name, func_ctype)
854 : #if CYTHON_COMPILING_IN_LIMITED_API
855 : #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name))
856 : #else
857 : #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name)
858 : #endif
859 : #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
860 : #include "pythread.h"
861 : #define Py_tss_NEEDS_INIT 0
862 : typedef int Py_tss_t;
863 : static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
864 : *key = PyThread_create_key();
865 : return 0;
866 : }
867 : static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
868 : Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
869 : *key = Py_tss_NEEDS_INIT;
870 : return key;
871 : }
872 : static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
873 : PyObject_Free(key);
874 : }
875 : static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
876 : return *key != Py_tss_NEEDS_INIT;
877 : }
878 : static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
879 : PyThread_delete_key(*key);
880 : *key = Py_tss_NEEDS_INIT;
881 : }
882 : static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
883 : return PyThread_set_key_value(*key, value);
884 : }
885 : static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
886 : return PyThread_get_key_value(*key);
887 : }
888 : #endif
889 : #if PY_MAJOR_VERSION < 3
890 : #if CYTHON_COMPILING_IN_PYPY
891 : #if PYPY_VERSION_NUM < 0x07030600
892 : #if defined(__cplusplus) && __cplusplus >= 201402L
893 : [[deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")]]
894 : #elif defined(__GNUC__) || defined(__clang__)
895 : __attribute__ ((__deprecated__("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")))
896 : #elif defined(_MSC_VER)
897 : __declspec(deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6"))
898 : #endif
899 : static CYTHON_INLINE int PyGILState_Check(void) {
900 : return 0;
901 : }
902 : #else // PYPY_VERSION_NUM < 0x07030600
903 : #endif // PYPY_VERSION_NUM < 0x07030600
904 : #else
905 : static CYTHON_INLINE int PyGILState_Check(void) {
906 : PyThreadState * tstate = _PyThreadState_Current;
907 : return tstate && (tstate == PyGILState_GetThisThreadState());
908 : }
909 : #endif
910 : #endif
911 : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 || defined(_PyDict_NewPresized)
912 : #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
913 : #else
914 : #define __Pyx_PyDict_NewPresized(n) PyDict_New()
915 : #endif
916 : #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
917 : #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
918 : #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
919 : #else
920 : #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
921 : #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
922 : #endif
923 : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030600B4 && PY_VERSION_HEX < 0x030d0000 && CYTHON_USE_UNICODE_INTERNALS
924 : #define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
925 0 : static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) {
926 0 : PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name);
927 0 : if (res == NULL) PyErr_Clear();
928 0 : return res;
929 : }
930 : #elif PY_MAJOR_VERSION >= 3 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000)
931 : #define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError
932 : #define __Pyx_PyDict_GetItemStr PyDict_GetItem
933 : #else
934 : static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) {
935 : #if CYTHON_COMPILING_IN_PYPY
936 : return PyDict_GetItem(dict, name);
937 : #else
938 : PyDictEntry *ep;
939 : PyDictObject *mp = (PyDictObject*) dict;
940 : long hash = ((PyStringObject *) name)->ob_shash;
941 : assert(hash != -1);
942 : ep = (mp->ma_lookup)(mp, name, hash);
943 : if (ep == NULL) {
944 : return NULL;
945 : }
946 : return ep->me_value;
947 : #endif
948 : }
949 : #define __Pyx_PyDict_GetItemStr PyDict_GetItem
950 : #endif
951 : #if CYTHON_USE_TYPE_SLOTS
952 : #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags)
953 : #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0)
954 : #define __Pyx_PyObject_GetIterNextFunc(obj) (Py_TYPE(obj)->tp_iternext)
955 : #else
956 : #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp))
957 : #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature)
958 : #define __Pyx_PyObject_GetIterNextFunc(obj) PyIter_Next
959 : #endif
960 : #if CYTHON_COMPILING_IN_LIMITED_API
961 : #define __Pyx_SetItemOnTypeDict(tp, k, v) PyObject_GenericSetAttr((PyObject*)tp, k, v)
962 : #else
963 : #define __Pyx_SetItemOnTypeDict(tp, k, v) PyDict_SetItem(tp->tp_dict, k, v)
964 : #endif
965 : #if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000
966 : #define __Pyx_PyHeapTypeObject_GC_Del(obj) {\
967 : PyTypeObject *type = Py_TYPE((PyObject*)obj);\
968 : assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\
969 : PyObject_GC_Del(obj);\
970 : Py_DECREF(type);\
971 : }
972 : #else
973 : #define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj)
974 : #endif
975 : #if CYTHON_COMPILING_IN_LIMITED_API
976 : #define CYTHON_PEP393_ENABLED 1
977 : #define __Pyx_PyUnicode_READY(op) (0)
978 : #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GetLength(u)
979 : #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i)
980 : #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U)
981 : #define __Pyx_PyUnicode_KIND(u) ((void)u, (0))
982 : #define __Pyx_PyUnicode_DATA(u) ((void*)u)
983 : #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i))
984 : #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u))
985 : #elif PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
986 : #define CYTHON_PEP393_ENABLED 1
987 : #if PY_VERSION_HEX >= 0x030C0000
988 : #define __Pyx_PyUnicode_READY(op) (0)
989 : #else
990 : #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
991 : 0 : _PyUnicode_Ready((PyObject *)(op)))
992 : #endif
993 : #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
994 : #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
995 : #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
996 : #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u))
997 : #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
998 : #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
999 : #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch)
1000 : #if PY_VERSION_HEX >= 0x030C0000
1001 : #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u))
1002 : #else
1003 : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000
1004 : #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
1005 : #else
1006 : #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
1007 : #endif
1008 : #endif
1009 : #else
1010 : #define CYTHON_PEP393_ENABLED 0
1011 : #define PyUnicode_1BYTE_KIND 1
1012 : #define PyUnicode_2BYTE_KIND 2
1013 : #define PyUnicode_4BYTE_KIND 4
1014 : #define __Pyx_PyUnicode_READY(op) (0)
1015 : #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
1016 : #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
1017 : #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535U : 1114111U)
1018 : #define __Pyx_PyUnicode_KIND(u) ((int)sizeof(Py_UNICODE))
1019 : #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
1020 : #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
1021 : #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = (Py_UNICODE) ch)
1022 : #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
1023 : #endif
1024 : #if CYTHON_COMPILING_IN_PYPY
1025 : #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
1026 : #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
1027 : #else
1028 : #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
1029 : #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
1030 : PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
1031 : #endif
1032 : #if CYTHON_COMPILING_IN_PYPY
1033 : #if !defined(PyUnicode_DecodeUnicodeEscape)
1034 : #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors)
1035 : #endif
1036 : #if !defined(PyUnicode_Contains) || (PY_MAJOR_VERSION == 2 && PYPY_VERSION_NUM < 0x07030500)
1037 : #undef PyUnicode_Contains
1038 : #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
1039 : #endif
1040 : #if !defined(PyByteArray_Check)
1041 : #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
1042 : #endif
1043 : #if !defined(PyObject_Format)
1044 : #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
1045 : #endif
1046 : #endif
1047 : #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
1048 : #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
1049 : #if PY_MAJOR_VERSION >= 3
1050 : #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
1051 : #else
1052 : #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
1053 : #endif
1054 : #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
1055 : #define PyObject_ASCII(o) PyObject_Repr(o)
1056 : #endif
1057 : #if PY_MAJOR_VERSION >= 3
1058 : #define PyBaseString_Type PyUnicode_Type
1059 : #define PyStringObject PyUnicodeObject
1060 : #define PyString_Type PyUnicode_Type
1061 : #define PyString_Check PyUnicode_Check
1062 : #define PyString_CheckExact PyUnicode_CheckExact
1063 : #ifndef PyObject_Unicode
1064 : #define PyObject_Unicode PyObject_Str
1065 : #endif
1066 : #endif
1067 : #if PY_MAJOR_VERSION >= 3
1068 : #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
1069 : #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
1070 : #else
1071 : #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
1072 : #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
1073 : #endif
1074 : #if CYTHON_COMPILING_IN_CPYTHON
1075 : #define __Pyx_PySequence_ListKeepNew(obj)\
1076 : (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj))
1077 : #else
1078 : #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj)
1079 : #endif
1080 : #ifndef PySet_CheckExact
1081 : #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type)
1082 : #endif
1083 : #if PY_VERSION_HEX >= 0x030900A4
1084 : #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
1085 : #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
1086 : #else
1087 : #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
1088 : #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
1089 : #endif
1090 : #if CYTHON_ASSUME_SAFE_MACROS
1091 : #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i)
1092 : #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
1093 : #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0))
1094 : #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0))
1095 : #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o)
1096 : #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o)
1097 : #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o)
1098 : #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o)
1099 : #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o)
1100 : #else
1101 : #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i)
1102 : #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
1103 : #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v)
1104 : #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v)
1105 : #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o)
1106 : #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o)
1107 : #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o)
1108 : #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o)
1109 : #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o)
1110 : #endif
1111 : #if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1
1112 : #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name)
1113 : #else
1114 12 : static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) {
1115 12 : PyObject *module = PyImport_AddModule(name);
1116 12 : Py_XINCREF(module);
1117 12 : return module;
1118 : }
1119 : #endif
1120 : #if PY_MAJOR_VERSION >= 3
1121 : #define PyIntObject PyLongObject
1122 : #define PyInt_Type PyLong_Type
1123 : #define PyInt_Check(op) PyLong_Check(op)
1124 : #define PyInt_CheckExact(op) PyLong_CheckExact(op)
1125 : #define __Pyx_Py3Int_Check(op) PyLong_Check(op)
1126 : #define __Pyx_Py3Int_CheckExact(op) PyLong_CheckExact(op)
1127 : #define PyInt_FromString PyLong_FromString
1128 : #define PyInt_FromUnicode PyLong_FromUnicode
1129 : #define PyInt_FromLong PyLong_FromLong
1130 : #define PyInt_FromSize_t PyLong_FromSize_t
1131 : #define PyInt_FromSsize_t PyLong_FromSsize_t
1132 : #define PyInt_AsLong PyLong_AsLong
1133 : #define PyInt_AS_LONG PyLong_AS_LONG
1134 : #define PyInt_AsSsize_t PyLong_AsSsize_t
1135 : #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
1136 : #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
1137 : #define PyNumber_Int PyNumber_Long
1138 : #else
1139 : #define __Pyx_Py3Int_Check(op) (PyLong_Check(op) || PyInt_Check(op))
1140 : #define __Pyx_Py3Int_CheckExact(op) (PyLong_CheckExact(op) || PyInt_CheckExact(op))
1141 : #endif
1142 : #if PY_MAJOR_VERSION >= 3
1143 : #define PyBoolObject PyLongObject
1144 : #endif
1145 : #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
1146 : #ifndef PyUnicode_InternFromString
1147 : #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
1148 : #endif
1149 : #endif
1150 : #if PY_VERSION_HEX < 0x030200A4
1151 : typedef long Py_hash_t;
1152 : #define __Pyx_PyInt_FromHash_t PyInt_FromLong
1153 : #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsHash_t
1154 : #else
1155 : #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
1156 : #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t
1157 : #endif
1158 : #if CYTHON_USE_ASYNC_SLOTS
1159 : #if PY_VERSION_HEX >= 0x030500B1
1160 : #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
1161 : #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
1162 : #else
1163 : #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
1164 : #endif
1165 : #else
1166 : #define __Pyx_PyType_AsAsync(obj) NULL
1167 : #endif
1168 : #ifndef __Pyx_PyAsyncMethodsStruct
1169 : typedef struct {
1170 : unaryfunc am_await;
1171 : unaryfunc am_aiter;
1172 : unaryfunc am_anext;
1173 : } __Pyx_PyAsyncMethodsStruct;
1174 : #endif
1175 :
1176 : #if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
1177 : #if !defined(_USE_MATH_DEFINES)
1178 : #define _USE_MATH_DEFINES
1179 : #endif
1180 : #endif
1181 : #include <math.h>
1182 : #ifdef NAN
1183 : #define __PYX_NAN() ((float) NAN)
1184 : #else
1185 : static CYTHON_INLINE float __PYX_NAN() {
1186 : float value;
1187 : memset(&value, 0xFF, sizeof(value));
1188 : return value;
1189 : }
1190 : #endif
1191 : #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
1192 : #define __Pyx_truncl trunc
1193 : #else
1194 : #define __Pyx_truncl truncl
1195 : #endif
1196 :
1197 : #define __PYX_MARK_ERR_POS(f_index, lineno) \
1198 : { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; }
1199 : #define __PYX_ERR(f_index, lineno, Ln_error) \
1200 : { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }
1201 :
1202 : #ifdef CYTHON_EXTERN_C
1203 : #undef __PYX_EXTERN_C
1204 : #define __PYX_EXTERN_C CYTHON_EXTERN_C
1205 : #elif defined(__PYX_EXTERN_C)
1206 : #ifdef _MSC_VER
1207 : #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.")
1208 : #else
1209 : #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.
1210 : #endif
1211 : #else
1212 : #ifdef __cplusplus
1213 : #define __PYX_EXTERN_C extern "C"
1214 : #else
1215 : #define __PYX_EXTERN_C extern
1216 : #endif
1217 : #endif
1218 :
1219 : #define __PYX_HAVE__scipy__stats___sobol
1220 : #define __PYX_HAVE_API__scipy__stats___sobol
1221 : /* Early includes */
1222 : #include <string.h>
1223 : #include <stdio.h>
1224 :
1225 : /* Using NumPy API declarations from "numpy/__init__.cython-30.pxd" */
1226 :
1227 : #include "numpy/arrayobject.h"
1228 : #include "numpy/ndarrayobject.h"
1229 : #include "numpy/ndarraytypes.h"
1230 : #include "numpy/arrayscalars.h"
1231 : #include "numpy/ufuncobject.h"
1232 :
1233 : int MAXDIM_DEFINE = 21201;
1234 : int MAXDEG_DEFINE = 18;
1235 :
1236 : #include "pythread.h"
1237 : #include <stdlib.h>
1238 : #ifdef _OPENMP
1239 : #include <omp.h>
1240 : #endif /* _OPENMP */
1241 :
1242 : #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
1243 : #define CYTHON_WITHOUT_ASSERTIONS
1244 : #endif
1245 :
1246 : typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
1247 : const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
1248 :
1249 : #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
1250 : #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
1251 : #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
1252 : #define __PYX_DEFAULT_STRING_ENCODING ""
1253 : #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
1254 : #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
1255 : #define __Pyx_uchar_cast(c) ((unsigned char)c)
1256 : #define __Pyx_long_cast(x) ((long)x)
1257 : #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
1258 : (sizeof(type) < sizeof(Py_ssize_t)) ||\
1259 : (sizeof(type) > sizeof(Py_ssize_t) &&\
1260 : likely(v < (type)PY_SSIZE_T_MAX ||\
1261 : v == (type)PY_SSIZE_T_MAX) &&\
1262 : (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
1263 : v == (type)PY_SSIZE_T_MIN))) ||\
1264 : (sizeof(type) == sizeof(Py_ssize_t) &&\
1265 : (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
1266 : v == (type)PY_SSIZE_T_MAX))) )
1267 890 : static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
1268 890 : return (size_t) i < (size_t) limit;
1269 : }
1270 : #if defined (__cplusplus) && __cplusplus >= 201103L
1271 : #include <cstdlib>
1272 : #define __Pyx_sst_abs(value) std::abs(value)
1273 : #elif SIZEOF_INT >= SIZEOF_SIZE_T
1274 : #define __Pyx_sst_abs(value) abs(value)
1275 : #elif SIZEOF_LONG >= SIZEOF_SIZE_T
1276 : #define __Pyx_sst_abs(value) labs(value)
1277 : #elif defined (_MSC_VER)
1278 : #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
1279 : #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
1280 : #define __Pyx_sst_abs(value) llabs(value)
1281 : #elif defined (__GNUC__)
1282 : #define __Pyx_sst_abs(value) __builtin_llabs(value)
1283 : #else
1284 : #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
1285 : #endif
1286 : static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s);
1287 : static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
1288 : static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
1289 : static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*);
1290 : #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
1291 : #define __Pyx_PyBytes_FromString PyBytes_FromString
1292 : #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
1293 : static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
1294 : #if PY_MAJOR_VERSION < 3
1295 : #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
1296 : #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
1297 : #else
1298 : #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
1299 : #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
1300 : #endif
1301 : #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
1302 : #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
1303 : #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
1304 : #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
1305 : #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
1306 : #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
1307 : #define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
1308 : #define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
1309 : #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
1310 : #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
1311 : #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
1312 : #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
1313 : #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
1314 : #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
1315 : #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
1316 : #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
1317 : #define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o)
1318 : #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
1319 : #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
1320 : #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
1321 : static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
1322 : static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
1323 : static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
1324 : static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
1325 : #define __Pyx_PySequence_Tuple(obj)\
1326 : (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
1327 : static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
1328 : static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
1329 : static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
1330 : #if CYTHON_ASSUME_SAFE_MACROS
1331 : #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
1332 : #else
1333 : #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
1334 : #endif
1335 : #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
1336 : #if PY_MAJOR_VERSION >= 3
1337 : #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
1338 : #else
1339 : #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
1340 : #endif
1341 : #if CYTHON_USE_PYLONG_INTERNALS
1342 : #if PY_VERSION_HEX >= 0x030C00A7
1343 : #ifndef _PyLong_SIGN_MASK
1344 : #define _PyLong_SIGN_MASK 3
1345 : #endif
1346 : #ifndef _PyLong_NON_SIZE_BITS
1347 : #define _PyLong_NON_SIZE_BITS 3
1348 : #endif
1349 : #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK)
1350 : #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0)
1351 : #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x))
1352 : #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1)
1353 : #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0)
1354 : #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0])
1355 : #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS))
1356 : #define __Pyx_PyLong_SignedDigitCount(x)\
1357 : ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x))
1358 : #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue)
1359 : #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x)
1360 : #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x)
1361 : #else
1362 : #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS))
1363 : #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0])
1364 : #endif
1365 : typedef Py_ssize_t __Pyx_compact_pylong;
1366 : typedef size_t __Pyx_compact_upylong;
1367 : #else
1368 : #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0)
1369 : #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0)
1370 : #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0)
1371 : #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0)
1372 : #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0])
1373 : #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x))
1374 : #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x)
1375 : #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1)
1376 : #define __Pyx_PyLong_CompactValue(x)\
1377 : ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0]))
1378 : typedef sdigit __Pyx_compact_pylong;
1379 : typedef digit __Pyx_compact_upylong;
1380 : #endif
1381 : #if PY_VERSION_HEX >= 0x030C00A5
1382 : #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit)
1383 : #else
1384 : #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit)
1385 : #endif
1386 : #endif
1387 : #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
1388 : #include <string.h>
1389 : static int __Pyx_sys_getdefaultencoding_not_ascii;
1390 : static int __Pyx_init_sys_getdefaultencoding_params(void) {
1391 : PyObject* sys;
1392 : PyObject* default_encoding = NULL;
1393 : PyObject* ascii_chars_u = NULL;
1394 : PyObject* ascii_chars_b = NULL;
1395 : const char* default_encoding_c;
1396 : sys = PyImport_ImportModule("sys");
1397 : if (!sys) goto bad;
1398 : default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
1399 : Py_DECREF(sys);
1400 : if (!default_encoding) goto bad;
1401 : default_encoding_c = PyBytes_AsString(default_encoding);
1402 : if (!default_encoding_c) goto bad;
1403 : if (strcmp(default_encoding_c, "ascii") == 0) {
1404 : __Pyx_sys_getdefaultencoding_not_ascii = 0;
1405 : } else {
1406 : char ascii_chars[128];
1407 : int c;
1408 : for (c = 0; c < 128; c++) {
1409 : ascii_chars[c] = (char) c;
1410 : }
1411 : __Pyx_sys_getdefaultencoding_not_ascii = 1;
1412 : ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
1413 : if (!ascii_chars_u) goto bad;
1414 : ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
1415 : if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
1416 : PyErr_Format(
1417 : PyExc_ValueError,
1418 : "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
1419 : default_encoding_c);
1420 : goto bad;
1421 : }
1422 : Py_DECREF(ascii_chars_u);
1423 : Py_DECREF(ascii_chars_b);
1424 : }
1425 : Py_DECREF(default_encoding);
1426 : return 0;
1427 : bad:
1428 : Py_XDECREF(default_encoding);
1429 : Py_XDECREF(ascii_chars_u);
1430 : Py_XDECREF(ascii_chars_b);
1431 : return -1;
1432 : }
1433 : #endif
1434 : #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
1435 : #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
1436 : #else
1437 : #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
1438 : #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
1439 : #include <string.h>
1440 : static char* __PYX_DEFAULT_STRING_ENCODING;
1441 : static int __Pyx_init_sys_getdefaultencoding_params(void) {
1442 : PyObject* sys;
1443 : PyObject* default_encoding = NULL;
1444 : char* default_encoding_c;
1445 : sys = PyImport_ImportModule("sys");
1446 : if (!sys) goto bad;
1447 : default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
1448 : Py_DECREF(sys);
1449 : if (!default_encoding) goto bad;
1450 : default_encoding_c = PyBytes_AsString(default_encoding);
1451 : if (!default_encoding_c) goto bad;
1452 : __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
1453 : if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
1454 : strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
1455 : Py_DECREF(default_encoding);
1456 : return 0;
1457 : bad:
1458 : Py_XDECREF(default_encoding);
1459 : return -1;
1460 : }
1461 : #endif
1462 : #endif
1463 :
1464 :
1465 : /* Test for GCC > 2.95 */
1466 : #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
1467 : #define likely(x) __builtin_expect(!!(x), 1)
1468 : #define unlikely(x) __builtin_expect(!!(x), 0)
1469 : #else /* !__GNUC__ or GCC < 2.95 */
1470 : #define likely(x) (x)
1471 : #define unlikely(x) (x)
1472 : #endif /* __GNUC__ */
1473 : static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
1474 :
1475 : #if !CYTHON_USE_MODULE_STATE
1476 : static PyObject *__pyx_m = NULL;
1477 : #endif
1478 : static int __pyx_lineno;
1479 : static int __pyx_clineno = 0;
1480 : static const char * __pyx_cfilenm = __FILE__;
1481 : static const char *__pyx_filename;
1482 :
1483 : /* Header.proto */
1484 : #if !defined(CYTHON_CCOMPLEX)
1485 : #if defined(__cplusplus)
1486 : #define CYTHON_CCOMPLEX 1
1487 : #elif (defined(_Complex_I) && !defined(_MSC_VER)) || ((defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) && !defined(__STDC_NO_COMPLEX__) && !defined(_MSC_VER))
1488 : #define CYTHON_CCOMPLEX 1
1489 : #else
1490 : #define CYTHON_CCOMPLEX 0
1491 : #endif
1492 : #endif
1493 : #if CYTHON_CCOMPLEX
1494 : #ifdef __cplusplus
1495 : #include <complex>
1496 : #else
1497 : #include <complex.h>
1498 : #endif
1499 : #endif
1500 : #if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
1501 : #undef _Complex_I
1502 : #define _Complex_I 1.0fj
1503 : #endif
1504 :
1505 : /* #### Code section: filename_table ### */
1506 :
1507 : static const char *__pyx_f[] = {
1508 : "_sobol.pyx",
1509 : "<stringsource>",
1510 : "__init__.cython-30.pxd",
1511 : "type.pxd",
1512 : };
1513 : /* #### Code section: utility_code_proto_before_types ### */
1514 : /* ForceInitThreads.proto */
1515 : #ifndef __PYX_FORCE_INIT_THREADS
1516 : #define __PYX_FORCE_INIT_THREADS 0
1517 : #endif
1518 :
1519 : /* NoFastGil.proto */
1520 : #define __Pyx_PyGILState_Ensure PyGILState_Ensure
1521 : #define __Pyx_PyGILState_Release PyGILState_Release
1522 : #define __Pyx_FastGIL_Remember()
1523 : #define __Pyx_FastGIL_Forget()
1524 : #define __Pyx_FastGilFuncInit()
1525 :
1526 : /* BufferFormatStructs.proto */
1527 : struct __Pyx_StructField_;
1528 : #define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0)
1529 : typedef struct {
1530 : const char* name;
1531 : struct __Pyx_StructField_* fields;
1532 : size_t size;
1533 : size_t arraysize[8];
1534 : int ndim;
1535 : char typegroup;
1536 : char is_unsigned;
1537 : int flags;
1538 : } __Pyx_TypeInfo;
1539 : typedef struct __Pyx_StructField_ {
1540 : __Pyx_TypeInfo* type;
1541 : const char* name;
1542 : size_t offset;
1543 : } __Pyx_StructField;
1544 : typedef struct {
1545 : __Pyx_StructField* field;
1546 : size_t parent_offset;
1547 : } __Pyx_BufFmt_StackElem;
1548 : typedef struct {
1549 : __Pyx_StructField root;
1550 : __Pyx_BufFmt_StackElem* head;
1551 : size_t fmt_offset;
1552 : size_t new_count, enc_count;
1553 : size_t struct_alignment;
1554 : int is_complex;
1555 : char enc_type;
1556 : char new_packmode;
1557 : char enc_packmode;
1558 : char is_valid_array;
1559 : } __Pyx_BufFmt_Context;
1560 :
1561 : /* Atomics.proto */
1562 : #include <pythread.h>
1563 : #ifndef CYTHON_ATOMICS
1564 : #define CYTHON_ATOMICS 1
1565 : #endif
1566 : #define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS
1567 : #define __pyx_atomic_int_type int
1568 : #define __pyx_nonatomic_int_type int
1569 : #if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\
1570 : (__STDC_VERSION__ >= 201112L) &&\
1571 : !defined(__STDC_NO_ATOMICS__))
1572 : #include <stdatomic.h>
1573 : #elif CYTHON_ATOMICS && (defined(__cplusplus) && (\
1574 : (__cplusplus >= 201103L) ||\
1575 : (defined(_MSC_VER) && _MSC_VER >= 1700)))
1576 : #include <atomic>
1577 : #endif
1578 : #if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\
1579 : (__STDC_VERSION__ >= 201112L) &&\
1580 : !defined(__STDC_NO_ATOMICS__) &&\
1581 : ATOMIC_INT_LOCK_FREE == 2)
1582 : #undef __pyx_atomic_int_type
1583 : #define __pyx_atomic_int_type atomic_int
1584 : #define __pyx_atomic_incr_aligned(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed)
1585 : #define __pyx_atomic_decr_aligned(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel)
1586 : #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER)
1587 : #pragma message ("Using standard C atomics")
1588 : #elif defined(__PYX_DEBUG_ATOMICS)
1589 : #warning "Using standard C atomics"
1590 : #endif
1591 : #elif CYTHON_ATOMICS && (defined(__cplusplus) && (\
1592 : (__cplusplus >= 201103L) ||\
1593 : \
1594 : (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\
1595 : ATOMIC_INT_LOCK_FREE == 2)
1596 : #undef __pyx_atomic_int_type
1597 : #define __pyx_atomic_int_type std::atomic_int
1598 : #define __pyx_atomic_incr_aligned(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed)
1599 : #define __pyx_atomic_decr_aligned(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel)
1600 : #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER)
1601 : #pragma message ("Using standard C++ atomics")
1602 : #elif defined(__PYX_DEBUG_ATOMICS)
1603 : #warning "Using standard C++ atomics"
1604 : #endif
1605 : #elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\
1606 : (__GNUC_MINOR__ > 1 ||\
1607 : (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2))))
1608 : #define __pyx_atomic_incr_aligned(value) __sync_fetch_and_add(value, 1)
1609 : #define __pyx_atomic_decr_aligned(value) __sync_fetch_and_sub(value, 1)
1610 : #ifdef __PYX_DEBUG_ATOMICS
1611 : #warning "Using GNU atomics"
1612 : #endif
1613 : #elif CYTHON_ATOMICS && defined(_MSC_VER)
1614 : #include <intrin.h>
1615 : #undef __pyx_atomic_int_type
1616 : #define __pyx_atomic_int_type long
1617 : #undef __pyx_nonatomic_int_type
1618 : #define __pyx_nonatomic_int_type long
1619 : #pragma intrinsic (_InterlockedExchangeAdd)
1620 : #define __pyx_atomic_incr_aligned(value) _InterlockedExchangeAdd(value, 1)
1621 : #define __pyx_atomic_decr_aligned(value) _InterlockedExchangeAdd(value, -1)
1622 : #ifdef __PYX_DEBUG_ATOMICS
1623 : #pragma message ("Using MSVC atomics")
1624 : #endif
1625 : #else
1626 : #undef CYTHON_ATOMICS
1627 : #define CYTHON_ATOMICS 0
1628 : #ifdef __PYX_DEBUG_ATOMICS
1629 : #warning "Not using atomics"
1630 : #endif
1631 : #endif
1632 : #if CYTHON_ATOMICS
1633 : #define __pyx_add_acquisition_count(memview)\
1634 : __pyx_atomic_incr_aligned(__pyx_get_slice_count_pointer(memview))
1635 : #define __pyx_sub_acquisition_count(memview)\
1636 : __pyx_atomic_decr_aligned(__pyx_get_slice_count_pointer(memview))
1637 : #else
1638 : #define __pyx_add_acquisition_count(memview)\
1639 : __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
1640 : #define __pyx_sub_acquisition_count(memview)\
1641 : __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
1642 : #endif
1643 :
1644 : /* MemviewSliceStruct.proto */
1645 : struct __pyx_memoryview_obj;
1646 : typedef struct {
1647 : struct __pyx_memoryview_obj *memview;
1648 : char *data;
1649 : Py_ssize_t shape[8];
1650 : Py_ssize_t strides[8];
1651 : Py_ssize_t suboffsets[8];
1652 : } __Pyx_memviewslice;
1653 : #define __Pyx_MemoryView_Len(m) (m.shape[0])
1654 :
1655 : /* #### Code section: numeric_typedefs ### */
1656 :
1657 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":769
1658 : * # in Cython to enable them only on the right systems.
1659 : *
1660 : * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<<
1661 : * ctypedef npy_int16 int16_t
1662 : * ctypedef npy_int32 int32_t
1663 : */
1664 : typedef npy_int8 __pyx_t_5numpy_int8_t;
1665 :
1666 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":770
1667 : *
1668 : * ctypedef npy_int8 int8_t
1669 : * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<<
1670 : * ctypedef npy_int32 int32_t
1671 : * ctypedef npy_int64 int64_t
1672 : */
1673 : typedef npy_int16 __pyx_t_5numpy_int16_t;
1674 :
1675 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":771
1676 : * ctypedef npy_int8 int8_t
1677 : * ctypedef npy_int16 int16_t
1678 : * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<<
1679 : * ctypedef npy_int64 int64_t
1680 : * #ctypedef npy_int96 int96_t
1681 : */
1682 : typedef npy_int32 __pyx_t_5numpy_int32_t;
1683 :
1684 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":772
1685 : * ctypedef npy_int16 int16_t
1686 : * ctypedef npy_int32 int32_t
1687 : * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<<
1688 : * #ctypedef npy_int96 int96_t
1689 : * #ctypedef npy_int128 int128_t
1690 : */
1691 : typedef npy_int64 __pyx_t_5numpy_int64_t;
1692 :
1693 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":776
1694 : * #ctypedef npy_int128 int128_t
1695 : *
1696 : * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<<
1697 : * ctypedef npy_uint16 uint16_t
1698 : * ctypedef npy_uint32 uint32_t
1699 : */
1700 : typedef npy_uint8 __pyx_t_5numpy_uint8_t;
1701 :
1702 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":777
1703 : *
1704 : * ctypedef npy_uint8 uint8_t
1705 : * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<<
1706 : * ctypedef npy_uint32 uint32_t
1707 : * ctypedef npy_uint64 uint64_t
1708 : */
1709 : typedef npy_uint16 __pyx_t_5numpy_uint16_t;
1710 :
1711 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":778
1712 : * ctypedef npy_uint8 uint8_t
1713 : * ctypedef npy_uint16 uint16_t
1714 : * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<<
1715 : * ctypedef npy_uint64 uint64_t
1716 : * #ctypedef npy_uint96 uint96_t
1717 : */
1718 : typedef npy_uint32 __pyx_t_5numpy_uint32_t;
1719 :
1720 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":779
1721 : * ctypedef npy_uint16 uint16_t
1722 : * ctypedef npy_uint32 uint32_t
1723 : * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<<
1724 : * #ctypedef npy_uint96 uint96_t
1725 : * #ctypedef npy_uint128 uint128_t
1726 : */
1727 : typedef npy_uint64 __pyx_t_5numpy_uint64_t;
1728 :
1729 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":783
1730 : * #ctypedef npy_uint128 uint128_t
1731 : *
1732 : * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<<
1733 : * ctypedef npy_float64 float64_t
1734 : * #ctypedef npy_float80 float80_t
1735 : */
1736 : typedef npy_float32 __pyx_t_5numpy_float32_t;
1737 :
1738 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":784
1739 : *
1740 : * ctypedef npy_float32 float32_t
1741 : * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<<
1742 : * #ctypedef npy_float80 float80_t
1743 : * #ctypedef npy_float128 float128_t
1744 : */
1745 : typedef npy_float64 __pyx_t_5numpy_float64_t;
1746 :
1747 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":791
1748 : * ctypedef double complex complex128_t
1749 : *
1750 : * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<<
1751 : * ctypedef npy_ulonglong ulonglong_t
1752 : *
1753 : */
1754 : typedef npy_longlong __pyx_t_5numpy_longlong_t;
1755 :
1756 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":792
1757 : *
1758 : * ctypedef npy_longlong longlong_t
1759 : * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<<
1760 : *
1761 : * ctypedef npy_intp intp_t
1762 : */
1763 : typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
1764 :
1765 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":794
1766 : * ctypedef npy_ulonglong ulonglong_t
1767 : *
1768 : * ctypedef npy_intp intp_t # <<<<<<<<<<<<<<
1769 : * ctypedef npy_uintp uintp_t
1770 : *
1771 : */
1772 : typedef npy_intp __pyx_t_5numpy_intp_t;
1773 :
1774 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":795
1775 : *
1776 : * ctypedef npy_intp intp_t
1777 : * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<<
1778 : *
1779 : * ctypedef npy_double float_t
1780 : */
1781 : typedef npy_uintp __pyx_t_5numpy_uintp_t;
1782 :
1783 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":797
1784 : * ctypedef npy_uintp uintp_t
1785 : *
1786 : * ctypedef npy_double float_t # <<<<<<<<<<<<<<
1787 : * ctypedef npy_double double_t
1788 : * ctypedef npy_longdouble longdouble_t
1789 : */
1790 : typedef npy_double __pyx_t_5numpy_float_t;
1791 :
1792 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":798
1793 : *
1794 : * ctypedef npy_double float_t
1795 : * ctypedef npy_double double_t # <<<<<<<<<<<<<<
1796 : * ctypedef npy_longdouble longdouble_t
1797 : *
1798 : */
1799 : typedef npy_double __pyx_t_5numpy_double_t;
1800 :
1801 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":799
1802 : * ctypedef npy_double float_t
1803 : * ctypedef npy_double double_t
1804 : * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<<
1805 : *
1806 : * ctypedef float complex cfloat_t
1807 : */
1808 : typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
1809 : /* #### Code section: complex_type_declarations ### */
1810 : /* Declarations.proto */
1811 : #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
1812 : #ifdef __cplusplus
1813 : typedef ::std::complex< float > __pyx_t_float_complex;
1814 : #else
1815 : typedef float _Complex __pyx_t_float_complex;
1816 : #endif
1817 : #else
1818 : typedef struct { float real, imag; } __pyx_t_float_complex;
1819 : #endif
1820 : static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);
1821 :
1822 : /* Declarations.proto */
1823 : #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
1824 : #ifdef __cplusplus
1825 : typedef ::std::complex< double > __pyx_t_double_complex;
1826 : #else
1827 : typedef double _Complex __pyx_t_double_complex;
1828 : #endif
1829 : #else
1830 : typedef struct { double real, imag; } __pyx_t_double_complex;
1831 : #endif
1832 : static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);
1833 :
1834 : /* Declarations.proto */
1835 : #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
1836 : #ifdef __cplusplus
1837 : typedef ::std::complex< long double > __pyx_t_long_double_complex;
1838 : #else
1839 : typedef long double _Complex __pyx_t_long_double_complex;
1840 : #endif
1841 : #else
1842 : typedef struct { long double real, imag; } __pyx_t_long_double_complex;
1843 : #endif
1844 : static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double, long double);
1845 :
1846 : /* #### Code section: type_declarations ### */
1847 :
1848 : /*--- Type declarations ---*/
1849 : struct __pyx_array_obj;
1850 : struct __pyx_MemviewEnum_obj;
1851 : struct __pyx_memoryview_obj;
1852 : struct __pyx_memoryviewslice_obj;
1853 :
1854 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1095
1855 : *
1856 : * # Iterator API added in v1.6
1857 : * ctypedef int (*NpyIter_IterNextFunc)(NpyIter* it) noexcept nogil # <<<<<<<<<<<<<<
1858 : * ctypedef void (*NpyIter_GetMultiIndexFunc)(NpyIter* it, npy_intp* outcoords) noexcept nogil
1859 : *
1860 : */
1861 : typedef int (*__pyx_t_5numpy_NpyIter_IterNextFunc)(NpyIter *);
1862 :
1863 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1096
1864 : * # Iterator API added in v1.6
1865 : * ctypedef int (*NpyIter_IterNextFunc)(NpyIter* it) noexcept nogil
1866 : * ctypedef void (*NpyIter_GetMultiIndexFunc)(NpyIter* it, npy_intp* outcoords) noexcept nogil # <<<<<<<<<<<<<<
1867 : *
1868 : * cdef extern from "numpy/arrayobject.h":
1869 : */
1870 : typedef void (*__pyx_t_5numpy_NpyIter_GetMultiIndexFunc)(NpyIter *, npy_intp *);
1871 : struct __pyx_defaults;
1872 : typedef struct __pyx_defaults __pyx_defaults;
1873 : struct __pyx_defaults1;
1874 : typedef struct __pyx_defaults1 __pyx_defaults1;
1875 : struct __pyx_defaults2;
1876 : typedef struct __pyx_defaults2 __pyx_defaults2;
1877 : struct __pyx_defaults3;
1878 : typedef struct __pyx_defaults3 __pyx_defaults3;
1879 : struct __pyx_defaults {
1880 : PyObject *__pyx_arg__fused_sigindex;
1881 : };
1882 : struct __pyx_defaults1 {
1883 : PyObject *__pyx_arg__fused_sigindex;
1884 : };
1885 : struct __pyx_defaults2 {
1886 : PyObject *__pyx_arg__fused_sigindex;
1887 : };
1888 : struct __pyx_defaults3 {
1889 : PyObject *__pyx_arg__fused_sigindex;
1890 : };
1891 :
1892 : /* "View.MemoryView":114
1893 : * @cython.collection_type("sequence")
1894 : * @cname("__pyx_array")
1895 : * cdef class array: # <<<<<<<<<<<<<<
1896 : *
1897 : * cdef:
1898 : */
1899 : struct __pyx_array_obj {
1900 : PyObject_HEAD
1901 : struct __pyx_vtabstruct_array *__pyx_vtab;
1902 : char *data;
1903 : Py_ssize_t len;
1904 : char *format;
1905 : int ndim;
1906 : Py_ssize_t *_shape;
1907 : Py_ssize_t *_strides;
1908 : Py_ssize_t itemsize;
1909 : PyObject *mode;
1910 : PyObject *_format;
1911 : void (*callback_free_data)(void *);
1912 : int free_data;
1913 : int dtype_is_object;
1914 : };
1915 :
1916 :
1917 : /* "View.MemoryView":302
1918 : *
1919 : * @cname('__pyx_MemviewEnum')
1920 : * cdef class Enum(object): # <<<<<<<<<<<<<<
1921 : * cdef object name
1922 : * def __init__(self, name):
1923 : */
1924 : struct __pyx_MemviewEnum_obj {
1925 : PyObject_HEAD
1926 : PyObject *name;
1927 : };
1928 :
1929 :
1930 : /* "View.MemoryView":337
1931 : *
1932 : * @cname('__pyx_memoryview')
1933 : * cdef class memoryview: # <<<<<<<<<<<<<<
1934 : *
1935 : * cdef object obj
1936 : */
1937 : struct __pyx_memoryview_obj {
1938 : PyObject_HEAD
1939 : struct __pyx_vtabstruct_memoryview *__pyx_vtab;
1940 : PyObject *obj;
1941 : PyObject *_size;
1942 : PyObject *_array_interface;
1943 : PyThread_type_lock lock;
1944 : __pyx_atomic_int_type acquisition_count;
1945 : Py_buffer view;
1946 : int flags;
1947 : int dtype_is_object;
1948 : __Pyx_TypeInfo *typeinfo;
1949 : };
1950 :
1951 :
1952 : /* "View.MemoryView":952
1953 : * @cython.collection_type("sequence")
1954 : * @cname('__pyx_memoryviewslice')
1955 : * cdef class _memoryviewslice(memoryview): # <<<<<<<<<<<<<<
1956 : * "Internal class for passing memoryview slices to Python"
1957 : *
1958 : */
1959 : struct __pyx_memoryviewslice_obj {
1960 : struct __pyx_memoryview_obj __pyx_base;
1961 : __Pyx_memviewslice from_slice;
1962 : PyObject *from_object;
1963 : PyObject *(*to_object_func)(char *);
1964 : int (*to_dtype_func)(char *, PyObject *);
1965 : };
1966 :
1967 :
1968 :
1969 : /* "View.MemoryView":114
1970 : * @cython.collection_type("sequence")
1971 : * @cname("__pyx_array")
1972 : * cdef class array: # <<<<<<<<<<<<<<
1973 : *
1974 : * cdef:
1975 : */
1976 :
1977 : struct __pyx_vtabstruct_array {
1978 : PyObject *(*get_memview)(struct __pyx_array_obj *);
1979 : };
1980 : static struct __pyx_vtabstruct_array *__pyx_vtabptr_array;
1981 :
1982 :
1983 : /* "View.MemoryView":337
1984 : *
1985 : * @cname('__pyx_memoryview')
1986 : * cdef class memoryview: # <<<<<<<<<<<<<<
1987 : *
1988 : * cdef object obj
1989 : */
1990 :
1991 : struct __pyx_vtabstruct_memoryview {
1992 : char *(*get_item_pointer)(struct __pyx_memoryview_obj *, PyObject *);
1993 : PyObject *(*is_slice)(struct __pyx_memoryview_obj *, PyObject *);
1994 : PyObject *(*setitem_slice_assignment)(struct __pyx_memoryview_obj *, PyObject *, PyObject *);
1995 : PyObject *(*setitem_slice_assign_scalar)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *);
1996 : PyObject *(*setitem_indexed)(struct __pyx_memoryview_obj *, PyObject *, PyObject *);
1997 : PyObject *(*convert_item_to_object)(struct __pyx_memoryview_obj *, char *);
1998 : PyObject *(*assign_item_from_object)(struct __pyx_memoryview_obj *, char *, PyObject *);
1999 : PyObject *(*_get_base)(struct __pyx_memoryview_obj *);
2000 : };
2001 : static struct __pyx_vtabstruct_memoryview *__pyx_vtabptr_memoryview;
2002 :
2003 :
2004 : /* "View.MemoryView":952
2005 : * @cython.collection_type("sequence")
2006 : * @cname('__pyx_memoryviewslice')
2007 : * cdef class _memoryviewslice(memoryview): # <<<<<<<<<<<<<<
2008 : * "Internal class for passing memoryview slices to Python"
2009 : *
2010 : */
2011 :
2012 : struct __pyx_vtabstruct__memoryviewslice {
2013 : struct __pyx_vtabstruct_memoryview __pyx_base;
2014 : };
2015 : static struct __pyx_vtabstruct__memoryviewslice *__pyx_vtabptr__memoryviewslice;
2016 : /* #### Code section: utility_code_proto ### */
2017 :
2018 : /* --- Runtime support code (head) --- */
2019 : /* Refnanny.proto */
2020 : #ifndef CYTHON_REFNANNY
2021 : #define CYTHON_REFNANNY 0
2022 : #endif
2023 : #if CYTHON_REFNANNY
2024 : typedef struct {
2025 : void (*INCREF)(void*, PyObject*, Py_ssize_t);
2026 : void (*DECREF)(void*, PyObject*, Py_ssize_t);
2027 : void (*GOTREF)(void*, PyObject*, Py_ssize_t);
2028 : void (*GIVEREF)(void*, PyObject*, Py_ssize_t);
2029 : void* (*SetupContext)(const char*, Py_ssize_t, const char*);
2030 : void (*FinishContext)(void**);
2031 : } __Pyx_RefNannyAPIStruct;
2032 : static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
2033 : static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
2034 : #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
2035 : #ifdef WITH_THREAD
2036 : #define __Pyx_RefNannySetupContext(name, acquire_gil)\
2037 : if (acquire_gil) {\
2038 : PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
2039 : __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
2040 : PyGILState_Release(__pyx_gilstate_save);\
2041 : } else {\
2042 : __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
2043 : }
2044 : #define __Pyx_RefNannyFinishContextNogil() {\
2045 : PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
2046 : __Pyx_RefNannyFinishContext();\
2047 : PyGILState_Release(__pyx_gilstate_save);\
2048 : }
2049 : #else
2050 : #define __Pyx_RefNannySetupContext(name, acquire_gil)\
2051 : __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__))
2052 : #define __Pyx_RefNannyFinishContextNogil() __Pyx_RefNannyFinishContext()
2053 : #endif
2054 : #define __Pyx_RefNannyFinishContextNogil() {\
2055 : PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
2056 : __Pyx_RefNannyFinishContext();\
2057 : PyGILState_Release(__pyx_gilstate_save);\
2058 : }
2059 : #define __Pyx_RefNannyFinishContext()\
2060 : __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
2061 : #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
2062 : #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
2063 : #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
2064 : #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
2065 : #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0)
2066 : #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0)
2067 : #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0)
2068 : #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0)
2069 : #else
2070 : #define __Pyx_RefNannyDeclarations
2071 : #define __Pyx_RefNannySetupContext(name, acquire_gil)
2072 : #define __Pyx_RefNannyFinishContextNogil()
2073 : #define __Pyx_RefNannyFinishContext()
2074 : #define __Pyx_INCREF(r) Py_INCREF(r)
2075 : #define __Pyx_DECREF(r) Py_DECREF(r)
2076 : #define __Pyx_GOTREF(r)
2077 : #define __Pyx_GIVEREF(r)
2078 : #define __Pyx_XINCREF(r) Py_XINCREF(r)
2079 : #define __Pyx_XDECREF(r) Py_XDECREF(r)
2080 : #define __Pyx_XGOTREF(r)
2081 : #define __Pyx_XGIVEREF(r)
2082 : #endif
2083 : #define __Pyx_Py_XDECREF_SET(r, v) do {\
2084 : PyObject *tmp = (PyObject *) r;\
2085 : r = v; Py_XDECREF(tmp);\
2086 : } while (0)
2087 : #define __Pyx_XDECREF_SET(r, v) do {\
2088 : PyObject *tmp = (PyObject *) r;\
2089 : r = v; __Pyx_XDECREF(tmp);\
2090 : } while (0)
2091 : #define __Pyx_DECREF_SET(r, v) do {\
2092 : PyObject *tmp = (PyObject *) r;\
2093 : r = v; __Pyx_DECREF(tmp);\
2094 : } while (0)
2095 : #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
2096 : #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
2097 :
2098 : /* PyErrExceptionMatches.proto */
2099 : #if CYTHON_FAST_THREAD_STATE
2100 : #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
2101 : static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
2102 : #else
2103 : #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
2104 : #endif
2105 :
2106 : /* PyThreadStateGet.proto */
2107 : #if CYTHON_FAST_THREAD_STATE
2108 : #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
2109 : #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
2110 : #if PY_VERSION_HEX >= 0x030C00A6
2111 : #define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL)
2112 : #define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL)
2113 : #else
2114 : #define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL)
2115 : #define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type)
2116 : #endif
2117 : #else
2118 : #define __Pyx_PyThreadState_declare
2119 : #define __Pyx_PyThreadState_assign
2120 : #define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL)
2121 : #define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred()
2122 : #endif
2123 :
2124 : /* PyErrFetchRestore.proto */
2125 : #if CYTHON_FAST_THREAD_STATE
2126 : #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
2127 : #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
2128 : #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
2129 : #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
2130 : #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
2131 : static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
2132 : static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
2133 : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6
2134 : #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
2135 : #else
2136 : #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
2137 : #endif
2138 : #else
2139 : #define __Pyx_PyErr_Clear() PyErr_Clear()
2140 : #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
2141 : #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
2142 : #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
2143 : #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
2144 : #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
2145 : #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
2146 : #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
2147 : #endif
2148 :
2149 : /* PyObjectGetAttrStr.proto */
2150 : #if CYTHON_USE_TYPE_SLOTS
2151 : static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
2152 : #else
2153 : #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
2154 : #endif
2155 :
2156 : /* PyObjectGetAttrStrNoError.proto */
2157 : static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);
2158 :
2159 : /* GetBuiltinName.proto */
2160 : static PyObject *__Pyx_GetBuiltinName(PyObject *name);
2161 :
2162 : /* TupleAndListFromArray.proto */
2163 : #if CYTHON_COMPILING_IN_CPYTHON
2164 : static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n);
2165 : static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n);
2166 : #endif
2167 :
2168 : /* IncludeStringH.proto */
2169 : #include <string.h>
2170 :
2171 : /* BytesEquals.proto */
2172 : static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
2173 :
2174 : /* UnicodeEquals.proto */
2175 : static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
2176 :
2177 : /* fastcall.proto */
2178 : #if CYTHON_AVOID_BORROWED_REFS
2179 : #define __Pyx_Arg_VARARGS(args, i) PySequence_GetItem(args, i)
2180 : #elif CYTHON_ASSUME_SAFE_MACROS
2181 : #define __Pyx_Arg_VARARGS(args, i) PyTuple_GET_ITEM(args, i)
2182 : #else
2183 : #define __Pyx_Arg_VARARGS(args, i) PyTuple_GetItem(args, i)
2184 : #endif
2185 : #if CYTHON_AVOID_BORROWED_REFS
2186 : #define __Pyx_Arg_NewRef_VARARGS(arg) __Pyx_NewRef(arg)
2187 : #define __Pyx_Arg_XDECREF_VARARGS(arg) Py_XDECREF(arg)
2188 : #else
2189 : #define __Pyx_Arg_NewRef_VARARGS(arg) arg
2190 : #define __Pyx_Arg_XDECREF_VARARGS(arg)
2191 : #endif
2192 : #define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds)
2193 : #define __Pyx_KwValues_VARARGS(args, nargs) NULL
2194 : #define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s)
2195 : #define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw)
2196 : #if CYTHON_METH_FASTCALL
2197 : #define __Pyx_Arg_FASTCALL(args, i) args[i]
2198 : #define __Pyx_NumKwargs_FASTCALL(kwds) PyTuple_GET_SIZE(kwds)
2199 : #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs))
2200 : static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s);
2201 : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
2202 : CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues);
2203 : #else
2204 : #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw)
2205 : #endif
2206 : #define __Pyx_Arg_NewRef_FASTCALL(arg) arg /* no-op, __Pyx_Arg_FASTCALL is direct and this needs
2207 : to have the same reference counting */
2208 : #define __Pyx_Arg_XDECREF_FASTCALL(arg)
2209 : #else
2210 : #define __Pyx_Arg_FASTCALL __Pyx_Arg_VARARGS
2211 : #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS
2212 : #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS
2213 : #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS
2214 : #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS
2215 : #define __Pyx_Arg_NewRef_FASTCALL(arg) __Pyx_Arg_NewRef_VARARGS(arg)
2216 : #define __Pyx_Arg_XDECREF_FASTCALL(arg) __Pyx_Arg_XDECREF_VARARGS(arg)
2217 : #endif
2218 : #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
2219 : #define __Pyx_ArgsSlice_VARARGS(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_VARARGS(args, start), stop - start)
2220 : #define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_FASTCALL(args, start), stop - start)
2221 : #else
2222 : #define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop)
2223 : #define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop)
2224 : #endif
2225 :
2226 : /* RaiseArgTupleInvalid.proto */
2227 : static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
2228 : Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
2229 :
2230 : /* RaiseDoubleKeywords.proto */
2231 : static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
2232 :
2233 : /* ParseKeywords.proto */
2234 : static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject *const *kwvalues,
2235 : PyObject **argnames[],
2236 : PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,
2237 : const char* function_name);
2238 :
2239 : /* ArgTypeTest.proto */
2240 : #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
2241 : ((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\
2242 : __Pyx__ArgTypeTest(obj, type, name, exact))
2243 : static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);
2244 :
2245 : /* RaiseException.proto */
2246 : static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
2247 :
2248 : /* PyFunctionFastCall.proto */
2249 : #if CYTHON_FAST_PYCALL
2250 : #if !CYTHON_VECTORCALL
2251 : #define __Pyx_PyFunction_FastCall(func, args, nargs)\
2252 : __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
2253 : static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
2254 : #endif
2255 : #define __Pyx_BUILD_ASSERT_EXPR(cond)\
2256 : (sizeof(char [1 - 2*!(cond)]) - 1)
2257 : #ifndef Py_MEMBER_SIZE
2258 : #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
2259 : #endif
2260 : #if !CYTHON_VECTORCALL
2261 : #if PY_VERSION_HEX >= 0x03080000
2262 : #include "frameobject.h"
2263 : #if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API
2264 : #ifndef Py_BUILD_CORE
2265 : #define Py_BUILD_CORE 1
2266 : #endif
2267 : #include "internal/pycore_frame.h"
2268 : #endif
2269 : #define __Pxy_PyFrame_Initialize_Offsets()
2270 : #define __Pyx_PyFrame_GetLocalsplus(frame) ((frame)->f_localsplus)
2271 : #else
2272 : static size_t __pyx_pyframe_localsplus_offset = 0;
2273 : #include "frameobject.h"
2274 : #define __Pxy_PyFrame_Initialize_Offsets()\
2275 : ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
2276 : (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
2277 : #define __Pyx_PyFrame_GetLocalsplus(frame)\
2278 : (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
2279 : #endif
2280 : #endif
2281 : #endif
2282 :
2283 : /* PyObjectCall.proto */
2284 : #if CYTHON_COMPILING_IN_CPYTHON
2285 : static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
2286 : #else
2287 : #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
2288 : #endif
2289 :
2290 : /* PyObjectCallMethO.proto */
2291 : #if CYTHON_COMPILING_IN_CPYTHON
2292 : static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
2293 : #endif
2294 :
2295 : /* PyObjectFastCall.proto */
2296 : #define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL)
2297 : static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs);
2298 :
2299 : /* RaiseUnexpectedTypeError.proto */
2300 : static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj);
2301 :
2302 : /* GCCDiagnostics.proto */
2303 : #if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
2304 : #define __Pyx_HAS_GCC_DIAGNOSTIC
2305 : #endif
2306 :
2307 : /* BuildPyUnicode.proto */
2308 : static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, char* chars, int clength,
2309 : int prepend_sign, char padding_char);
2310 :
2311 : /* CIntToPyUnicode.proto */
2312 : static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char);
2313 :
2314 : /* CIntToPyUnicode.proto */
2315 : static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char);
2316 :
2317 : /* JoinPyUnicode.proto */
2318 : static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength,
2319 : Py_UCS4 max_char);
2320 :
2321 : /* StrEquals.proto */
2322 : #if PY_MAJOR_VERSION >= 3
2323 : #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
2324 : #else
2325 : #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
2326 : #endif
2327 :
2328 : /* PyObjectFormatSimple.proto */
2329 : #if CYTHON_COMPILING_IN_PYPY
2330 : #define __Pyx_PyObject_FormatSimple(s, f) (\
2331 : likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
2332 : PyObject_Format(s, f))
2333 : #elif PY_MAJOR_VERSION < 3
2334 : #define __Pyx_PyObject_FormatSimple(s, f) (\
2335 : likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
2336 : likely(PyString_CheckExact(s)) ? PyUnicode_FromEncodedObject(s, NULL, "strict") :\
2337 : PyObject_Format(s, f))
2338 : #elif CYTHON_USE_TYPE_SLOTS
2339 : #define __Pyx_PyObject_FormatSimple(s, f) (\
2340 : likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
2341 : likely(PyLong_CheckExact(s)) ? PyLong_Type.tp_repr(s) :\
2342 : likely(PyFloat_CheckExact(s)) ? PyFloat_Type.tp_repr(s) :\
2343 : PyObject_Format(s, f))
2344 : #else
2345 : #define __Pyx_PyObject_FormatSimple(s, f) (\
2346 : likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
2347 : PyObject_Format(s, f))
2348 : #endif
2349 :
2350 : CYTHON_UNUSED static int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
2351 : static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *); /*proto*/
2352 : /* GetAttr.proto */
2353 : static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);
2354 :
2355 : /* GetItemInt.proto */
2356 : #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
2357 : (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
2358 : __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
2359 : (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
2360 : __Pyx_GetItemInt_Generic(o, to_py_func(i))))
2361 : #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
2362 : (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
2363 : __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
2364 : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
2365 : static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
2366 : int wraparound, int boundscheck);
2367 : #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
2368 : (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
2369 : __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
2370 : (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
2371 : static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
2372 : int wraparound, int boundscheck);
2373 : static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
2374 : static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
2375 : int is_list, int wraparound, int boundscheck);
2376 :
2377 : /* PyObjectCallOneArg.proto */
2378 : static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
2379 :
2380 : /* ObjectGetItem.proto */
2381 : #if CYTHON_USE_TYPE_SLOTS
2382 : static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key);
2383 : #else
2384 : #define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key)
2385 : #endif
2386 :
2387 : /* KeywordStringCheck.proto */
2388 : static int __Pyx_CheckKeywordStrings(PyObject *kw, const char* function_name, int kw_allowed);
2389 :
2390 : /* DivInt[Py_ssize_t].proto */
2391 : static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t);
2392 :
2393 : /* UnaryNegOverflows.proto */
2394 : #define __Pyx_UNARY_NEG_WOULD_OVERFLOW(x)\
2395 : (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x)))
2396 :
2397 : /* GetAttr3.proto */
2398 : static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);
2399 :
2400 : /* PyDictVersioning.proto */
2401 : #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
2402 : #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)
2403 : #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
2404 : #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
2405 : (version_var) = __PYX_GET_DICT_VERSION(dict);\
2406 : (cache_var) = (value);
2407 : #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
2408 : static PY_UINT64_T __pyx_dict_version = 0;\
2409 : static PyObject *__pyx_dict_cached_value = NULL;\
2410 : if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
2411 : (VAR) = __pyx_dict_cached_value;\
2412 : } else {\
2413 : (VAR) = __pyx_dict_cached_value = (LOOKUP);\
2414 : __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
2415 : }\
2416 : }
2417 : static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
2418 : static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
2419 : static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
2420 : #else
2421 : #define __PYX_GET_DICT_VERSION(dict) (0)
2422 : #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
2423 : #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
2424 : #endif
2425 :
2426 : /* GetModuleGlobalName.proto */
2427 : #if CYTHON_USE_DICT_VERSIONS
2428 : #define __Pyx_GetModuleGlobalName(var, name) do {\
2429 : static PY_UINT64_T __pyx_dict_version = 0;\
2430 : static PyObject *__pyx_dict_cached_value = NULL;\
2431 : (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
2432 : (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
2433 : __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
2434 : } while(0)
2435 : #define __Pyx_GetModuleGlobalNameUncached(var, name) do {\
2436 : PY_UINT64_T __pyx_dict_version;\
2437 : PyObject *__pyx_dict_cached_value;\
2438 : (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
2439 : } while(0)
2440 : static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
2441 : #else
2442 : #define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name)
2443 : #define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name)
2444 : static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
2445 : #endif
2446 :
2447 : /* AssertionsEnabled.proto */
2448 : #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
2449 : #define __Pyx_init_assertions_enabled() (0)
2450 : #define __pyx_assertions_enabled() (1)
2451 : #elif CYTHON_COMPILING_IN_LIMITED_API || (CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030C0000)
2452 : static int __pyx_assertions_enabled_flag;
2453 : #define __pyx_assertions_enabled() (__pyx_assertions_enabled_flag)
2454 3 : static int __Pyx_init_assertions_enabled(void) {
2455 3 : PyObject *builtins, *debug, *debug_str;
2456 3 : int flag;
2457 3 : builtins = PyEval_GetBuiltins();
2458 3 : if (!builtins) goto bad;
2459 3 : debug_str = PyUnicode_FromStringAndSize("__debug__", 9);
2460 3 : if (!debug_str) goto bad;
2461 3 : debug = PyObject_GetItem(builtins, debug_str);
2462 3 : Py_DECREF(debug_str);
2463 3 : if (!debug) goto bad;
2464 3 : flag = PyObject_IsTrue(debug);
2465 3 : Py_DECREF(debug);
2466 3 : if (flag == -1) goto bad;
2467 3 : __pyx_assertions_enabled_flag = flag;
2468 3 : return 0;
2469 0 : bad:
2470 0 : __pyx_assertions_enabled_flag = 1;
2471 0 : return -1;
2472 : }
2473 : #else
2474 : #define __Pyx_init_assertions_enabled() (0)
2475 : #define __pyx_assertions_enabled() (!Py_OptimizeFlag)
2476 : #endif
2477 :
2478 : /* RaiseTooManyValuesToUnpack.proto */
2479 : static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
2480 :
2481 : /* RaiseNeedMoreValuesToUnpack.proto */
2482 : static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
2483 :
2484 : /* RaiseNoneIterError.proto */
2485 : static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);
2486 :
2487 : /* ExtTypeTest.proto */
2488 : static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
2489 :
2490 : /* GetTopmostException.proto */
2491 : #if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
2492 : static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
2493 : #endif
2494 :
2495 : /* SaveResetException.proto */
2496 : #if CYTHON_FAST_THREAD_STATE
2497 : #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
2498 : static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
2499 : #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
2500 : static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
2501 : #else
2502 : #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
2503 : #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
2504 : #endif
2505 :
2506 : /* GetException.proto */
2507 : #if CYTHON_FAST_THREAD_STATE
2508 : #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
2509 : static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
2510 : #else
2511 : static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
2512 : #endif
2513 :
2514 : /* SwapException.proto */
2515 : #if CYTHON_FAST_THREAD_STATE
2516 : #define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
2517 : static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
2518 : #else
2519 : static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
2520 : #endif
2521 :
2522 : /* Import.proto */
2523 : static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
2524 :
2525 : /* ImportDottedModule.proto */
2526 : static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple);
2527 : #if PY_MAJOR_VERSION >= 3
2528 : static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple);
2529 : #endif
2530 :
2531 : /* FastTypeChecks.proto */
2532 : #if CYTHON_COMPILING_IN_CPYTHON
2533 : #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
2534 : #define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2)
2535 : static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
2536 : static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b);
2537 : static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
2538 : static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
2539 : #else
2540 : #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
2541 : #define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2))
2542 : #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
2543 : #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
2544 : #endif
2545 : #define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2)
2546 : #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
2547 :
2548 : CYTHON_UNUSED static int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
2549 : /* ListCompAppend.proto */
2550 : #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
2551 0 : static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
2552 0 : PyListObject* L = (PyListObject*) list;
2553 0 : Py_ssize_t len = Py_SIZE(list);
2554 0 : if (likely(L->allocated > len)) {
2555 0 : Py_INCREF(x);
2556 : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
2557 : L->ob_item[len] = x;
2558 : #else
2559 0 : PyList_SET_ITEM(list, len, x);
2560 : #endif
2561 0 : __Pyx_SET_SIZE(list, len + 1);
2562 0 : return 0;
2563 : }
2564 0 : return PyList_Append(list, x);
2565 : }
2566 : #else
2567 : #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
2568 : #endif
2569 :
2570 : /* PySequenceMultiply.proto */
2571 : #define __Pyx_PySequence_Multiply_Left(mul, seq) __Pyx_PySequence_Multiply(seq, mul)
2572 : static CYTHON_INLINE PyObject* __Pyx_PySequence_Multiply(PyObject *seq, Py_ssize_t mul);
2573 :
2574 : /* SetItemInt.proto */
2575 : #define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
2576 : (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
2577 : __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\
2578 : (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\
2579 : __Pyx_SetItemInt_Generic(o, to_py_func(i), v)))
2580 : static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
2581 : static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
2582 : int is_list, int wraparound, int boundscheck);
2583 :
2584 : /* RaiseUnboundLocalError.proto */
2585 : static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);
2586 :
2587 : /* DivInt[long].proto */
2588 : static CYTHON_INLINE long __Pyx_div_long(long, long);
2589 :
2590 : /* PySequenceContains.proto */
2591 0 : static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
2592 0 : int result = PySequence_Contains(seq, item);
2593 0 : return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
2594 : }
2595 :
2596 : /* ImportFrom.proto */
2597 : static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
2598 :
2599 : /* HasAttr.proto */
2600 : static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);
2601 :
2602 : /* PyObjectLookupSpecial.proto */
2603 : #if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
2604 : #define __Pyx_PyObject_LookupSpecialNoError(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 0)
2605 : #define __Pyx_PyObject_LookupSpecial(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 1)
2606 : static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error);
2607 : #else
2608 : #define __Pyx_PyObject_LookupSpecialNoError(o,n) __Pyx_PyObject_GetAttrStrNoError(o,n)
2609 : #define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n)
2610 : #endif
2611 :
2612 : /* DictGetItem.proto */
2613 : #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
2614 : static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key);
2615 : #define __Pyx_PyObject_Dict_GetItem(obj, name)\
2616 : (likely(PyDict_CheckExact(obj)) ?\
2617 : __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name))
2618 : #else
2619 : #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
2620 : #define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name)
2621 : #endif
2622 :
2623 : /* PyDictContains.proto */
2624 705 : static CYTHON_INLINE int __Pyx_PyDict_ContainsTF(PyObject* item, PyObject* dict, int eq) {
2625 1410 : int result = PyDict_Contains(dict, item);
2626 705 : return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
2627 : }
2628 :
2629 : /* UnicodeAsUCS4.proto */
2630 : static CYTHON_INLINE Py_UCS4 __Pyx_PyUnicode_AsPy_UCS4(PyObject*);
2631 :
2632 : /* object_ord.proto */
2633 : #if PY_MAJOR_VERSION >= 3
2634 : #define __Pyx_PyObject_Ord(c)\
2635 : (likely(PyUnicode_Check(c)) ? (long)__Pyx_PyUnicode_AsPy_UCS4(c) : __Pyx__PyObject_Ord(c))
2636 : #else
2637 : #define __Pyx_PyObject_Ord(c) __Pyx__PyObject_Ord(c)
2638 : #endif
2639 : static long __Pyx__PyObject_Ord(PyObject* c);
2640 :
2641 : /* memoryview_get_from_buffer.proto */
2642 : #if !CYTHON_COMPILING_IN_LIMITED_API || CYTHON_LIMITED_API >= 0x030b0000
2643 : #define __Pyx_PyMemoryView_Get_itemsize(o) PyMemoryView_GET_BUFFER(o)->itemsize
2644 : #else
2645 : // can't get format like this unfortunately. It's unicode via getattr
2646 : static Py_ssize_t __Pyx_PyMemoryView_Get_itemsize(PyObject *obj);
2647 : #endif
2648 :
2649 : /* memoryview_get_from_buffer.proto */
2650 : #if !CYTHON_COMPILING_IN_LIMITED_API || CYTHON_LIMITED_API >= 0x030b0000
2651 : #define __Pyx_PyMemoryView_Get_ndim(o) PyMemoryView_GET_BUFFER(o)->ndim
2652 : #else
2653 : // can't get format like this unfortunately. It's unicode via getattr
2654 : static int __Pyx_PyMemoryView_Get_ndim(PyObject *obj);
2655 : #endif
2656 :
2657 : /* IterFinish.proto */
2658 : static CYTHON_INLINE int __Pyx_IterFinish(void);
2659 :
2660 : /* PyObjectCallNoArg.proto */
2661 : static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
2662 :
2663 : /* PyObjectGetMethod.proto */
2664 : static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);
2665 :
2666 : /* PyObjectCallMethod0.proto */
2667 : static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name);
2668 :
2669 : /* UnpackItemEndCheck.proto */
2670 : static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);
2671 :
2672 : /* UnpackTupleError.proto */
2673 : static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index);
2674 :
2675 : /* UnpackTuple2.proto */
2676 : #define __Pyx_unpack_tuple2(tuple, value1, value2, is_tuple, has_known_size, decref_tuple)\
2677 : (likely(is_tuple || PyTuple_Check(tuple)) ?\
2678 : (likely(has_known_size || PyTuple_GET_SIZE(tuple) == 2) ?\
2679 : __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple) :\
2680 : (__Pyx_UnpackTupleError(tuple, 2), -1)) :\
2681 : __Pyx_unpack_tuple2_generic(tuple, value1, value2, has_known_size, decref_tuple))
2682 : static CYTHON_INLINE int __Pyx_unpack_tuple2_exact(
2683 : PyObject* tuple, PyObject** value1, PyObject** value2, int decref_tuple);
2684 : static int __Pyx_unpack_tuple2_generic(
2685 : PyObject* tuple, PyObject** value1, PyObject** value2, int has_known_size, int decref_tuple);
2686 :
2687 : /* dict_iter.proto */
2688 : static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name,
2689 : Py_ssize_t* p_orig_length, int* p_is_dict);
2690 : static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos,
2691 : PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict);
2692 :
2693 : /* ListExtend.proto */
2694 0 : static CYTHON_INLINE int __Pyx_PyList_Extend(PyObject* L, PyObject* v) {
2695 : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000
2696 0 : PyObject* none = _PyList_Extend((PyListObject*)L, v);
2697 0 : if (unlikely(!none))
2698 : return -1;
2699 0 : Py_DECREF(none);
2700 : return 0;
2701 : #else
2702 : return PyList_SetSlice(L, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, v);
2703 : #endif
2704 : }
2705 :
2706 : /* py_dict_values.proto */
2707 : static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d);
2708 :
2709 : /* UnpackUnboundCMethod.proto */
2710 : typedef struct {
2711 : PyObject *type;
2712 : PyObject **method_name;
2713 : PyCFunction func;
2714 : PyObject *method;
2715 : int flag;
2716 : } __Pyx_CachedCFunction;
2717 :
2718 : /* CallUnboundCMethod0.proto */
2719 : static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self);
2720 : #if CYTHON_COMPILING_IN_CPYTHON
2721 : #define __Pyx_CallUnboundCMethod0(cfunc, self)\
2722 : (likely((cfunc)->func) ?\
2723 : (likely((cfunc)->flag == METH_NOARGS) ? (*((cfunc)->func))(self, NULL) :\
2724 : (PY_VERSION_HEX >= 0x030600B1 && likely((cfunc)->flag == METH_FASTCALL) ?\
2725 : (PY_VERSION_HEX >= 0x030700A0 ?\
2726 : (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0) :\
2727 : (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL)) :\
2728 : (PY_VERSION_HEX >= 0x030700A0 && (cfunc)->flag == (METH_FASTCALL | METH_KEYWORDS) ?\
2729 : (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL) :\
2730 : (likely((cfunc)->flag == (METH_VARARGS | METH_KEYWORDS)) ? ((*(PyCFunctionWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, __pyx_empty_tuple, NULL)) :\
2731 : ((cfunc)->flag == METH_VARARGS ? (*((cfunc)->func))(self, __pyx_empty_tuple) :\
2732 : __Pyx__CallUnboundCMethod0(cfunc, self)))))) :\
2733 : __Pyx__CallUnboundCMethod0(cfunc, self))
2734 : #else
2735 : #define __Pyx_CallUnboundCMethod0(cfunc, self) __Pyx__CallUnboundCMethod0(cfunc, self)
2736 : #endif
2737 :
2738 : /* dict_getitem_default.proto */
2739 : static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value);
2740 :
2741 : /* CallUnboundCMethod1.proto */
2742 : static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg);
2743 : #if CYTHON_COMPILING_IN_CPYTHON
2744 : static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg);
2745 : #else
2746 : #define __Pyx_CallUnboundCMethod1(cfunc, self, arg) __Pyx__CallUnboundCMethod1(cfunc, self, arg)
2747 : #endif
2748 :
2749 : /* CallUnboundCMethod2.proto */
2750 : static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2);
2751 : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1
2752 : static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2);
2753 : #else
2754 : #define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2) __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2)
2755 : #endif
2756 :
2757 : /* ListAppend.proto */
2758 : #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
2759 1099 : static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
2760 1099 : PyListObject* L = (PyListObject*) list;
2761 1099 : Py_ssize_t len = Py_SIZE(list);
2762 1099 : if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
2763 0 : Py_INCREF(x);
2764 : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
2765 : L->ob_item[len] = x;
2766 : #else
2767 0 : PyList_SET_ITEM(list, len, x);
2768 : #endif
2769 0 : __Pyx_SET_SIZE(list, len + 1);
2770 0 : return 0;
2771 : }
2772 1099 : return PyList_Append(list, x);
2773 : }
2774 : #else
2775 : #define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
2776 : #endif
2777 :
2778 : /* WriteUnraisableException.proto */
2779 : static void __Pyx_WriteUnraisable(const char *name, int clineno,
2780 : int lineno, const char *filename,
2781 : int full_traceback, int nogil);
2782 :
2783 : /* PyObject_GenericGetAttrNoDict.proto */
2784 : #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
2785 : static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
2786 : #else
2787 : #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
2788 : #endif
2789 :
2790 : /* PyObject_GenericGetAttr.proto */
2791 : #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
2792 : static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
2793 : #else
2794 : #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
2795 : #endif
2796 :
2797 : /* IncludeStructmemberH.proto */
2798 : #include <structmember.h>
2799 :
2800 : /* FixUpExtensionType.proto */
2801 : #if CYTHON_USE_TYPE_SPECS
2802 : static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type);
2803 : #endif
2804 :
2805 : /* ValidateBasesTuple.proto */
2806 : #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS
2807 : static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases);
2808 : #endif
2809 :
2810 : /* PyType_Ready.proto */
2811 : CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t);
2812 :
2813 : /* SetVTable.proto */
2814 : static int __Pyx_SetVtable(PyTypeObject* typeptr , void* vtable);
2815 :
2816 : /* GetVTable.proto */
2817 : static void* __Pyx_GetVtable(PyTypeObject *type);
2818 :
2819 : /* MergeVTables.proto */
2820 : #if !CYTHON_COMPILING_IN_LIMITED_API
2821 : static int __Pyx_MergeVtables(PyTypeObject *type);
2822 : #endif
2823 :
2824 : /* SetupReduce.proto */
2825 : #if !CYTHON_COMPILING_IN_LIMITED_API
2826 : static int __Pyx_setup_reduce(PyObject* type_obj);
2827 : #endif
2828 :
2829 : /* TypeImport.proto */
2830 : #ifndef __PYX_HAVE_RT_ImportType_proto_3_0_11
2831 : #define __PYX_HAVE_RT_ImportType_proto_3_0_11
2832 : #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
2833 : #include <stdalign.h>
2834 : #endif
2835 : #if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L
2836 : #define __PYX_GET_STRUCT_ALIGNMENT_3_0_11(s) alignof(s)
2837 : #else
2838 : #define __PYX_GET_STRUCT_ALIGNMENT_3_0_11(s) sizeof(void*)
2839 : #endif
2840 : enum __Pyx_ImportType_CheckSize_3_0_11 {
2841 : __Pyx_ImportType_CheckSize_Error_3_0_11 = 0,
2842 : __Pyx_ImportType_CheckSize_Warn_3_0_11 = 1,
2843 : __Pyx_ImportType_CheckSize_Ignore_3_0_11 = 2
2844 : };
2845 : static PyTypeObject *__Pyx_ImportType_3_0_11(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_11 check_size);
2846 : #endif
2847 :
2848 : /* FetchSharedCythonModule.proto */
2849 : static PyObject *__Pyx_FetchSharedCythonABIModule(void);
2850 :
2851 : /* FetchCommonType.proto */
2852 : #if !CYTHON_USE_TYPE_SPECS
2853 : static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
2854 : #else
2855 : static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases);
2856 : #endif
2857 :
2858 : /* PyMethodNew.proto */
2859 : #if CYTHON_COMPILING_IN_LIMITED_API
2860 : static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
2861 : PyObject *typesModule=NULL, *methodType=NULL, *result=NULL;
2862 : CYTHON_UNUSED_VAR(typ);
2863 : if (!self)
2864 : return __Pyx_NewRef(func);
2865 : typesModule = PyImport_ImportModule("types");
2866 : if (!typesModule) return NULL;
2867 : methodType = PyObject_GetAttrString(typesModule, "MethodType");
2868 : Py_DECREF(typesModule);
2869 : if (!methodType) return NULL;
2870 : result = PyObject_CallFunctionObjArgs(methodType, func, self, NULL);
2871 : Py_DECREF(methodType);
2872 : return result;
2873 : }
2874 : #elif PY_MAJOR_VERSION >= 3
2875 0 : static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
2876 0 : CYTHON_UNUSED_VAR(typ);
2877 0 : if (!self)
2878 0 : return __Pyx_NewRef(func);
2879 0 : return PyMethod_New(func, self);
2880 : }
2881 : #else
2882 : #define __Pyx_PyMethod_New PyMethod_New
2883 : #endif
2884 :
2885 : /* PyVectorcallFastCallDict.proto */
2886 : #if CYTHON_METH_FASTCALL
2887 : static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw);
2888 : #endif
2889 :
2890 : /* CythonFunctionShared.proto */
2891 : #define __Pyx_CyFunction_USED
2892 : #define __Pyx_CYFUNCTION_STATICMETHOD 0x01
2893 : #define __Pyx_CYFUNCTION_CLASSMETHOD 0x02
2894 : #define __Pyx_CYFUNCTION_CCLASS 0x04
2895 : #define __Pyx_CYFUNCTION_COROUTINE 0x08
2896 : #define __Pyx_CyFunction_GetClosure(f)\
2897 : (((__pyx_CyFunctionObject *) (f))->func_closure)
2898 : #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
2899 : #define __Pyx_CyFunction_GetClassObj(f)\
2900 : (((__pyx_CyFunctionObject *) (f))->func_classobj)
2901 : #else
2902 : #define __Pyx_CyFunction_GetClassObj(f)\
2903 : ((PyObject*) ((PyCMethodObject *) (f))->mm_class)
2904 : #endif
2905 : #define __Pyx_CyFunction_SetClassObj(f, classobj)\
2906 : __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj))
2907 : #define __Pyx_CyFunction_Defaults(type, f)\
2908 : ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
2909 : #define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
2910 : ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
2911 : typedef struct {
2912 : #if CYTHON_COMPILING_IN_LIMITED_API
2913 : PyObject_HEAD
2914 : PyObject *func;
2915 : #elif PY_VERSION_HEX < 0x030900B1
2916 : PyCFunctionObject func;
2917 : #else
2918 : PyCMethodObject func;
2919 : #endif
2920 : #if CYTHON_BACKPORT_VECTORCALL
2921 : __pyx_vectorcallfunc func_vectorcall;
2922 : #endif
2923 : #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API
2924 : PyObject *func_weakreflist;
2925 : #endif
2926 : PyObject *func_dict;
2927 : PyObject *func_name;
2928 : PyObject *func_qualname;
2929 : PyObject *func_doc;
2930 : PyObject *func_globals;
2931 : PyObject *func_code;
2932 : PyObject *func_closure;
2933 : #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
2934 : PyObject *func_classobj;
2935 : #endif
2936 : void *defaults;
2937 : int defaults_pyobjects;
2938 : size_t defaults_size;
2939 : int flags;
2940 : PyObject *defaults_tuple;
2941 : PyObject *defaults_kwdict;
2942 : PyObject *(*defaults_getter)(PyObject *);
2943 : PyObject *func_annotations;
2944 : PyObject *func_is_coroutine;
2945 : } __pyx_CyFunctionObject;
2946 : #undef __Pyx_CyOrPyCFunction_Check
2947 : #define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_CyFunctionType)
2948 : #define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_CyFunctionType, &PyCFunction_Type)
2949 : #define __Pyx_CyFunction_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_CyFunctionType)
2950 : static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc);
2951 : #undef __Pyx_IsSameCFunction
2952 : #define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc)
2953 : static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml,
2954 : int flags, PyObject* qualname,
2955 : PyObject *closure,
2956 : PyObject *module, PyObject *globals,
2957 : PyObject* code);
2958 : static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj);
2959 : static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
2960 : size_t size,
2961 : int pyobjects);
2962 : static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
2963 : PyObject *tuple);
2964 : static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
2965 : PyObject *dict);
2966 : static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
2967 : PyObject *dict);
2968 : static int __pyx_CyFunction_init(PyObject *module);
2969 : #if CYTHON_METH_FASTCALL
2970 : static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
2971 : static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
2972 : static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
2973 : static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
2974 : #if CYTHON_BACKPORT_VECTORCALL
2975 : #define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall)
2976 : #else
2977 : #define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall)
2978 : #endif
2979 : #endif
2980 :
2981 : /* CythonFunction.proto */
2982 : static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
2983 : int flags, PyObject* qualname,
2984 : PyObject *closure,
2985 : PyObject *module, PyObject *globals,
2986 : PyObject* code);
2987 :
2988 : /* FusedFunction.proto */
2989 : typedef struct {
2990 : __pyx_CyFunctionObject func;
2991 : PyObject *__signatures__;
2992 : PyObject *self;
2993 : } __pyx_FusedFunctionObject;
2994 : static PyObject *__pyx_FusedFunction_New(PyMethodDef *ml, int flags,
2995 : PyObject *qualname, PyObject *closure,
2996 : PyObject *module, PyObject *globals,
2997 : PyObject *code);
2998 : static int __pyx_FusedFunction_clear(__pyx_FusedFunctionObject *self);
2999 : static int __pyx_FusedFunction_init(PyObject *module);
3000 : #define __Pyx_FusedFunction_USED
3001 :
3002 : /* CLineInTraceback.proto */
3003 : #ifdef CYTHON_CLINE_IN_TRACEBACK
3004 : #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
3005 : #else
3006 : static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
3007 : #endif
3008 :
3009 : /* CodeObjectCache.proto */
3010 : #if !CYTHON_COMPILING_IN_LIMITED_API
3011 : typedef struct {
3012 : PyCodeObject* code_object;
3013 : int code_line;
3014 : } __Pyx_CodeObjectCacheEntry;
3015 : struct __Pyx_CodeObjectCache {
3016 : int count;
3017 : int max_count;
3018 : __Pyx_CodeObjectCacheEntry* entries;
3019 : };
3020 : static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
3021 : static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
3022 : static PyCodeObject *__pyx_find_code_object(int code_line);
3023 : static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
3024 : #endif
3025 :
3026 : /* AddTraceback.proto */
3027 : static void __Pyx_AddTraceback(const char *funcname, int c_line,
3028 : int py_line, const char *filename);
3029 :
3030 : #if PY_MAJOR_VERSION < 3
3031 : static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags);
3032 : static void __Pyx_ReleaseBuffer(Py_buffer *view);
3033 : #else
3034 : #define __Pyx_GetBuffer PyObject_GetBuffer
3035 : #define __Pyx_ReleaseBuffer PyBuffer_Release
3036 : #endif
3037 :
3038 :
3039 : /* BufferStructDeclare.proto */
3040 : typedef struct {
3041 : Py_ssize_t shape, strides, suboffsets;
3042 : } __Pyx_Buf_DimInfo;
3043 : typedef struct {
3044 : size_t refcount;
3045 : Py_buffer pybuffer;
3046 : } __Pyx_Buffer;
3047 : typedef struct {
3048 : __Pyx_Buffer *rcbuffer;
3049 : char *data;
3050 : __Pyx_Buf_DimInfo diminfo[8];
3051 : } __Pyx_LocalBuf_ND;
3052 :
3053 : /* MemviewSliceIsContig.proto */
3054 : static int __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim);
3055 :
3056 : /* OverlappingSlices.proto */
3057 : static int __pyx_slices_overlap(__Pyx_memviewslice *slice1,
3058 : __Pyx_memviewslice *slice2,
3059 : int ndim, size_t itemsize);
3060 :
3061 : /* IsLittleEndian.proto */
3062 : static CYTHON_INLINE int __Pyx_Is_Little_Endian(void);
3063 :
3064 : /* BufferFormatCheck.proto */
3065 : static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts);
3066 : static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
3067 : __Pyx_BufFmt_StackElem* stack,
3068 : __Pyx_TypeInfo* type);
3069 :
3070 : /* TypeInfoCompare.proto */
3071 : static int __pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b);
3072 :
3073 : /* MemviewSliceValidateAndInit.proto */
3074 : static int __Pyx_ValidateAndInit_memviewslice(
3075 : int *axes_specs,
3076 : int c_or_f_flag,
3077 : int buf_flags,
3078 : int ndim,
3079 : __Pyx_TypeInfo *dtype,
3080 : __Pyx_BufFmt_StackElem stack[],
3081 : __Pyx_memviewslice *memviewslice,
3082 : PyObject *original_obj);
3083 :
3084 : /* ObjectToMemviewSlice.proto */
3085 : static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_5numpy_uint32_t(PyObject *, int writable_flag);
3086 :
3087 : /* ObjectToMemviewSlice.proto */
3088 : static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_5numpy_uint64_t(PyObject *, int writable_flag);
3089 :
3090 : /* ObjectToMemviewSlice.proto */
3091 : static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_5numpy_uint32_t__const__(PyObject *, int writable_flag);
3092 :
3093 : /* ObjectToMemviewSlice.proto */
3094 : static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_5numpy_uint64_t__const__(PyObject *, int writable_flag);
3095 :
3096 : /* ObjectToMemviewSlice.proto */
3097 : static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_d_d_dc_nn___pyx_t_5numpy_uint32_t(PyObject *, int writable_flag);
3098 :
3099 : /* ObjectToMemviewSlice.proto */
3100 : static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_d_d_dc_nn___pyx_t_5numpy_uint64_t(PyObject *, int writable_flag);
3101 :
3102 : /* ObjectToMemviewSlice.proto */
3103 : static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_uint32_t(PyObject *, int writable_flag);
3104 :
3105 : /* ObjectToMemviewSlice.proto */
3106 : static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_5numpy_float64_t(PyObject *, int writable_flag);
3107 :
3108 : /* ObjectToMemviewSlice.proto */
3109 : static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_uint64_t(PyObject *, int writable_flag);
3110 :
3111 : /* ObjectToMemviewSlice.proto */
3112 : static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_float_t__const__(PyObject *, int writable_flag);
3113 :
3114 : /* ObjectToMemviewSlice.proto */
3115 : static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_float_t(PyObject *, int writable_flag);
3116 :
3117 : /* ObjectToMemviewSlice.proto */
3118 : static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_intp_t(PyObject *, int writable_flag);
3119 :
3120 : /* PyUCS4InUnicode.proto */
3121 : static CYTHON_INLINE int __Pyx_UnicodeContainsUCS4(PyObject* unicode, Py_UCS4 character);
3122 :
3123 : /* ObjectToMemviewSlice.proto */
3124 : static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(PyObject *, int writable_flag);
3125 :
3126 : /* ObjectToMemviewSlice.proto */
3127 : static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint64_t(PyObject *, int writable_flag);
3128 :
3129 : /* RealImag.proto */
3130 : #if CYTHON_CCOMPLEX
3131 : #ifdef __cplusplus
3132 : #define __Pyx_CREAL(z) ((z).real())
3133 : #define __Pyx_CIMAG(z) ((z).imag())
3134 : #else
3135 : #define __Pyx_CREAL(z) (__real__(z))
3136 : #define __Pyx_CIMAG(z) (__imag__(z))
3137 : #endif
3138 : #else
3139 : #define __Pyx_CREAL(z) ((z).real)
3140 : #define __Pyx_CIMAG(z) ((z).imag)
3141 : #endif
3142 : #if defined(__cplusplus) && CYTHON_CCOMPLEX\
3143 : && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103)
3144 : #define __Pyx_SET_CREAL(z,x) ((z).real(x))
3145 : #define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
3146 : #else
3147 : #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
3148 : #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
3149 : #endif
3150 :
3151 : /* Arithmetic.proto */
3152 : #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
3153 : #define __Pyx_c_eq_float(a, b) ((a)==(b))
3154 : #define __Pyx_c_sum_float(a, b) ((a)+(b))
3155 : #define __Pyx_c_diff_float(a, b) ((a)-(b))
3156 : #define __Pyx_c_prod_float(a, b) ((a)*(b))
3157 : #define __Pyx_c_quot_float(a, b) ((a)/(b))
3158 : #define __Pyx_c_neg_float(a) (-(a))
3159 : #ifdef __cplusplus
3160 : #define __Pyx_c_is_zero_float(z) ((z)==(float)0)
3161 : #define __Pyx_c_conj_float(z) (::std::conj(z))
3162 : #if 1
3163 : #define __Pyx_c_abs_float(z) (::std::abs(z))
3164 : #define __Pyx_c_pow_float(a, b) (::std::pow(a, b))
3165 : #endif
3166 : #else
3167 : #define __Pyx_c_is_zero_float(z) ((z)==0)
3168 : #define __Pyx_c_conj_float(z) (conjf(z))
3169 : #if 1
3170 : #define __Pyx_c_abs_float(z) (cabsf(z))
3171 : #define __Pyx_c_pow_float(a, b) (cpowf(a, b))
3172 : #endif
3173 : #endif
3174 : #else
3175 : static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex);
3176 : static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex);
3177 : static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex);
3178 : static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex);
3179 : static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex);
3180 : static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex);
3181 : static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex);
3182 : static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex);
3183 : #if 1
3184 : static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex);
3185 : static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex);
3186 : #endif
3187 : #endif
3188 :
3189 : /* Arithmetic.proto */
3190 : #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
3191 : #define __Pyx_c_eq_double(a, b) ((a)==(b))
3192 : #define __Pyx_c_sum_double(a, b) ((a)+(b))
3193 : #define __Pyx_c_diff_double(a, b) ((a)-(b))
3194 : #define __Pyx_c_prod_double(a, b) ((a)*(b))
3195 : #define __Pyx_c_quot_double(a, b) ((a)/(b))
3196 : #define __Pyx_c_neg_double(a) (-(a))
3197 : #ifdef __cplusplus
3198 : #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
3199 : #define __Pyx_c_conj_double(z) (::std::conj(z))
3200 : #if 1
3201 : #define __Pyx_c_abs_double(z) (::std::abs(z))
3202 : #define __Pyx_c_pow_double(a, b) (::std::pow(a, b))
3203 : #endif
3204 : #else
3205 : #define __Pyx_c_is_zero_double(z) ((z)==0)
3206 : #define __Pyx_c_conj_double(z) (conj(z))
3207 : #if 1
3208 : #define __Pyx_c_abs_double(z) (cabs(z))
3209 : #define __Pyx_c_pow_double(a, b) (cpow(a, b))
3210 : #endif
3211 : #endif
3212 : #else
3213 : static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex);
3214 : static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex);
3215 : static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex);
3216 : static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex);
3217 : static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex);
3218 : static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex);
3219 : static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex);
3220 : static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex);
3221 : #if 1
3222 : static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex);
3223 : static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex);
3224 : #endif
3225 : #endif
3226 :
3227 : /* Arithmetic.proto */
3228 : #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
3229 : #define __Pyx_c_eq_long__double(a, b) ((a)==(b))
3230 : #define __Pyx_c_sum_long__double(a, b) ((a)+(b))
3231 : #define __Pyx_c_diff_long__double(a, b) ((a)-(b))
3232 : #define __Pyx_c_prod_long__double(a, b) ((a)*(b))
3233 : #define __Pyx_c_quot_long__double(a, b) ((a)/(b))
3234 : #define __Pyx_c_neg_long__double(a) (-(a))
3235 : #ifdef __cplusplus
3236 : #define __Pyx_c_is_zero_long__double(z) ((z)==(long double)0)
3237 : #define __Pyx_c_conj_long__double(z) (::std::conj(z))
3238 : #if 1
3239 : #define __Pyx_c_abs_long__double(z) (::std::abs(z))
3240 : #define __Pyx_c_pow_long__double(a, b) (::std::pow(a, b))
3241 : #endif
3242 : #else
3243 : #define __Pyx_c_is_zero_long__double(z) ((z)==0)
3244 : #define __Pyx_c_conj_long__double(z) (conjl(z))
3245 : #if 1
3246 : #define __Pyx_c_abs_long__double(z) (cabsl(z))
3247 : #define __Pyx_c_pow_long__double(a, b) (cpowl(a, b))
3248 : #endif
3249 : #endif
3250 : #else
3251 : static CYTHON_INLINE int __Pyx_c_eq_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
3252 : static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_sum_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
3253 : static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_diff_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
3254 : static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_prod_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
3255 : static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_quot_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
3256 : static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_neg_long__double(__pyx_t_long_double_complex);
3257 : static CYTHON_INLINE int __Pyx_c_is_zero_long__double(__pyx_t_long_double_complex);
3258 : static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_conj_long__double(__pyx_t_long_double_complex);
3259 : #if 1
3260 : static CYTHON_INLINE long double __Pyx_c_abs_long__double(__pyx_t_long_double_complex);
3261 : static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_pow_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
3262 : #endif
3263 : #endif
3264 :
3265 : /* MemviewSliceCopyTemplate.proto */
3266 : static __Pyx_memviewslice
3267 : __pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs,
3268 : const char *mode, int ndim,
3269 : size_t sizeof_dtype, int contig_flag,
3270 : int dtype_is_object);
3271 :
3272 : /* MemviewSliceInit.proto */
3273 : #define __Pyx_BUF_MAX_NDIMS %(BUF_MAX_NDIMS)d
3274 : #define __Pyx_MEMVIEW_DIRECT 1
3275 : #define __Pyx_MEMVIEW_PTR 2
3276 : #define __Pyx_MEMVIEW_FULL 4
3277 : #define __Pyx_MEMVIEW_CONTIG 8
3278 : #define __Pyx_MEMVIEW_STRIDED 16
3279 : #define __Pyx_MEMVIEW_FOLLOW 32
3280 : #define __Pyx_IS_C_CONTIG 1
3281 : #define __Pyx_IS_F_CONTIG 2
3282 : static int __Pyx_init_memviewslice(
3283 : struct __pyx_memoryview_obj *memview,
3284 : int ndim,
3285 : __Pyx_memviewslice *memviewslice,
3286 : int memview_is_new_reference);
3287 : static CYTHON_INLINE int __pyx_add_acquisition_count_locked(
3288 : __pyx_atomic_int_type *acquisition_count, PyThread_type_lock lock);
3289 : static CYTHON_INLINE int __pyx_sub_acquisition_count_locked(
3290 : __pyx_atomic_int_type *acquisition_count, PyThread_type_lock lock);
3291 : #define __pyx_get_slice_count_pointer(memview) (&memview->acquisition_count)
3292 : #define __PYX_INC_MEMVIEW(slice, have_gil) __Pyx_INC_MEMVIEW(slice, have_gil, __LINE__)
3293 : #define __PYX_XCLEAR_MEMVIEW(slice, have_gil) __Pyx_XCLEAR_MEMVIEW(slice, have_gil, __LINE__)
3294 : static CYTHON_INLINE void __Pyx_INC_MEMVIEW(__Pyx_memviewslice *, int, int);
3295 : static CYTHON_INLINE void __Pyx_XCLEAR_MEMVIEW(__Pyx_memviewslice *, int, int);
3296 :
3297 : /* CIntToPy.proto */
3298 : static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
3299 :
3300 : /* CIntFromPy.proto */
3301 : static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
3302 :
3303 : /* CIntFromPy.proto */
3304 : static CYTHON_INLINE npy_uint32 __Pyx_PyInt_As_npy_uint32(PyObject *);
3305 :
3306 : /* CIntFromPy.proto */
3307 : static CYTHON_INLINE npy_uint64 __Pyx_PyInt_As_npy_uint64(PyObject *);
3308 :
3309 : /* CIntToPy.proto */
3310 : static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
3311 :
3312 : /* CIntToPy.proto */
3313 : static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_uint32(npy_uint32 value);
3314 :
3315 : /* CIntToPy.proto */
3316 : static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_uint64(npy_uint64 value);
3317 :
3318 : /* ImportNumPyArray.proto */
3319 : static PyObject *__pyx_numpy_ndarray = NULL;
3320 : static PyObject* __Pyx_ImportNumPyArrayTypeIfAvailable(void);
3321 :
3322 : /* CIntFromPy.proto */
3323 : static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
3324 :
3325 : /* CIntFromPy.proto */
3326 : static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *);
3327 :
3328 : /* FormatTypeName.proto */
3329 : #if CYTHON_COMPILING_IN_LIMITED_API
3330 : typedef PyObject *__Pyx_TypeName;
3331 : #define __Pyx_FMT_TYPENAME "%U"
3332 : static __Pyx_TypeName __Pyx_PyType_GetName(PyTypeObject* tp);
3333 : #define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj)
3334 : #else
3335 : typedef const char *__Pyx_TypeName;
3336 : #define __Pyx_FMT_TYPENAME "%.200s"
3337 : #define __Pyx_PyType_GetName(tp) ((tp)->tp_name)
3338 : #define __Pyx_DECREF_TypeName(obj)
3339 : #endif
3340 :
3341 : /* CheckBinaryVersion.proto */
3342 : static unsigned long __Pyx_get_runtime_version(void);
3343 : static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer);
3344 :
3345 : /* InitStrings.proto */
3346 : static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
3347 :
3348 : /* #### Code section: module_declarations ### */
3349 : static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self); /* proto*/
3350 : static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto*/
3351 : static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj); /* proto*/
3352 : static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src); /* proto*/
3353 : static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value); /* proto*/
3354 : static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto*/
3355 : static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
3356 : static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
3357 : static PyObject *__pyx_memoryview__get_base(struct __pyx_memoryview_obj *__pyx_v_self); /* proto*/
3358 : static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
3359 : static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
3360 : static PyObject *__pyx_memoryviewslice__get_base(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto*/
3361 : static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_8itemsize_itemsize(PyArray_Descr *__pyx_v_self); /* proto*/
3362 : static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_9alignment_alignment(PyArray_Descr *__pyx_v_self); /* proto*/
3363 : static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_6fields_fields(PyArray_Descr *__pyx_v_self); /* proto*/
3364 : static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_5names_names(PyArray_Descr *__pyx_v_self); /* proto*/
3365 : static CYTHON_INLINE PyArray_ArrayDescr *__pyx_f_5numpy_5dtype_8subarray_subarray(PyArray_Descr *__pyx_v_self); /* proto*/
3366 : static CYTHON_INLINE npy_uint64 __pyx_f_5numpy_5dtype_5flags_flags(PyArray_Descr *__pyx_v_self); /* proto*/
3367 : static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_7numiter_numiter(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
3368 : static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_4size_size(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
3369 : static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_5index_index(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
3370 : static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_2nd_nd(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
3371 : static CYTHON_INLINE npy_intp *__pyx_f_5numpy_9broadcast_10dimensions_dimensions(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
3372 : static CYTHON_INLINE void **__pyx_f_5numpy_9broadcast_5iters_iters(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
3373 : static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base_base(PyArrayObject *__pyx_v_self); /* proto*/
3374 : static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArrayObject *__pyx_v_self); /* proto*/
3375 : static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx_v_self); /* proto*/
3376 : static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObject *__pyx_v_self); /* proto*/
3377 : static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayObject *__pyx_v_self); /* proto*/
3378 : static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject *__pyx_v_self); /* proto*/
3379 : static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data_data(PyArrayObject *__pyx_v_self); /* proto*/
3380 :
3381 : /* Module declarations from "cython.view" */
3382 :
3383 : /* Module declarations from "cython.dataclasses" */
3384 :
3385 : /* Module declarations from "cython" */
3386 :
3387 : /* Module declarations from "libc.string" */
3388 :
3389 : /* Module declarations from "libc.stdio" */
3390 :
3391 : /* Module declarations from "__builtin__" */
3392 :
3393 : /* Module declarations from "cpython.type" */
3394 :
3395 : /* Module declarations from "cpython" */
3396 :
3397 : /* Module declarations from "cpython.object" */
3398 :
3399 : /* Module declarations from "cpython.ref" */
3400 :
3401 : /* Module declarations from "numpy" */
3402 :
3403 : /* Module declarations from "numpy" */
3404 : static CYTHON_INLINE int __pyx_f_5numpy_import_array(void); /*proto*/
3405 :
3406 : /* Module declarations from "scipy.stats._sobol" */
3407 : static PyObject *__pyx_collections_abc_Sequence = 0;
3408 : static PyObject *generic = 0;
3409 : static PyObject *strided = 0;
3410 : static PyObject *indirect = 0;
3411 : static PyObject *contiguous = 0;
3412 : static PyObject *indirect_contiguous = 0;
3413 : static int __pyx_memoryview_thread_locks_used;
3414 : static PyThread_type_lock __pyx_memoryview_thread_locks[8];
3415 : static void __pyx_f_5scipy_5stats_6_sobol__fill_p_cumulative(__Pyx_memviewslice, __Pyx_memviewslice, int __pyx_skip_dispatch); /*proto*/
3416 : static void __pyx_f_5scipy_5stats_6_sobol__categorize(__Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, int __pyx_skip_dispatch); /*proto*/
3417 : static int __pyx_f_5scipy_5stats_6_sobol__find_index(__Pyx_memviewslice, int const , float const ); /*proto*/
3418 : static int __pyx_fuse_0__pyx_f_5scipy_5stats_6_sobol_bit_length(__pyx_t_5numpy_uint32_t); /*proto*/
3419 : static int __pyx_fuse_1__pyx_f_5scipy_5stats_6_sobol_bit_length(__pyx_t_5numpy_uint64_t); /*proto*/
3420 : static int __pyx_fuse_0__pyx_f_5scipy_5stats_6_sobol_low_0_bit(__pyx_t_5numpy_uint32_t); /*proto*/
3421 : static int __pyx_fuse_1__pyx_f_5scipy_5stats_6_sobol_low_0_bit(__pyx_t_5numpy_uint64_t); /*proto*/
3422 : static int __pyx_fuse_0__pyx_f_5scipy_5stats_6_sobol_ibits(__pyx_t_5numpy_uint32_t, int const , int const ); /*proto*/
3423 : static int __pyx_fuse_1__pyx_f_5scipy_5stats_6_sobol_ibits(__pyx_t_5numpy_uint64_t, int const , int const ); /*proto*/
3424 : static void __pyx_fuse_0__pyx_f_5scipy_5stats_6_sobol__initialize_v(__Pyx_memviewslice, int const , int const , int __pyx_skip_dispatch); /*proto*/
3425 : static void __pyx_fuse_1__pyx_f_5scipy_5stats_6_sobol__initialize_v(__Pyx_memviewslice, int const , int const , int __pyx_skip_dispatch); /*proto*/
3426 : static void __pyx_fuse_0__pyx_f_5scipy_5stats_6_sobol_draw(__pyx_t_5numpy_uint32_t const , __pyx_t_5numpy_uint32_t const , int const , __pyx_t_5numpy_float64_t const , __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice); /*proto*/
3427 : static void __pyx_fuse_1__pyx_f_5scipy_5stats_6_sobol_draw(__pyx_t_5numpy_uint64_t const , __pyx_t_5numpy_uint64_t const , int const , __pyx_t_5numpy_float64_t const , __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice); /*proto*/
3428 : static void __pyx_fuse_0__pyx_f_5scipy_5stats_6_sobol__fast_forward(__pyx_t_5numpy_uint32_t const , __pyx_t_5numpy_uint32_t const , int const , __Pyx_memviewslice, __Pyx_memviewslice, int __pyx_skip_dispatch); /*proto*/
3429 : static void __pyx_fuse_1__pyx_f_5scipy_5stats_6_sobol__fast_forward(__pyx_t_5numpy_uint64_t const , __pyx_t_5numpy_uint64_t const , int const , __Pyx_memviewslice, __Pyx_memviewslice, int __pyx_skip_dispatch); /*proto*/
3430 : static __pyx_t_5numpy_uint32_t __pyx_fuse_0__pyx_f_5scipy_5stats_6_sobol_cdot_pow2(__Pyx_memviewslice); /*proto*/
3431 : static __pyx_t_5numpy_uint64_t __pyx_fuse_1__pyx_f_5scipy_5stats_6_sobol_cdot_pow2(__Pyx_memviewslice); /*proto*/
3432 : static void __pyx_fuse_0__pyx_f_5scipy_5stats_6_sobol__cscramble(int const , int const , __Pyx_memviewslice, __Pyx_memviewslice, int __pyx_skip_dispatch); /*proto*/
3433 : static void __pyx_fuse_1__pyx_f_5scipy_5stats_6_sobol__cscramble(int const , int const , __Pyx_memviewslice, __Pyx_memviewslice, int __pyx_skip_dispatch); /*proto*/
3434 : static int __pyx_array_allocate_buffer(struct __pyx_array_obj *); /*proto*/
3435 : static struct __pyx_array_obj *__pyx_array_new(PyObject *, Py_ssize_t, char *, char *, char *); /*proto*/
3436 : static PyObject *__pyx_memoryview_new(PyObject *, int, int, __Pyx_TypeInfo *); /*proto*/
3437 : static CYTHON_INLINE int __pyx_memoryview_check(PyObject *); /*proto*/
3438 : static PyObject *_unellipsify(PyObject *, int); /*proto*/
3439 : static int assert_direct_dimensions(Py_ssize_t *, int); /*proto*/
3440 : static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *, PyObject *); /*proto*/
3441 : static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int, int); /*proto*/
3442 : static char *__pyx_pybuffer_index(Py_buffer *, char *, Py_ssize_t, Py_ssize_t); /*proto*/
3443 : static int __pyx_memslice_transpose(__Pyx_memviewslice *); /*proto*/
3444 : static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice, int, PyObject *(*)(char *), int (*)(char *, PyObject *), int); /*proto*/
3445 : static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
3446 : static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
3447 : static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *); /*proto*/
3448 : static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
3449 : static Py_ssize_t abs_py_ssize_t(Py_ssize_t); /*proto*/
3450 : static char __pyx_get_best_slice_order(__Pyx_memviewslice *, int); /*proto*/
3451 : static void _copy_strided_to_strided(char *, Py_ssize_t *, char *, Py_ssize_t *, Py_ssize_t *, Py_ssize_t *, int, size_t); /*proto*/
3452 : static void copy_strided_to_strided(__Pyx_memviewslice *, __Pyx_memviewslice *, int, size_t); /*proto*/
3453 : static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *, int); /*proto*/
3454 : static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *, Py_ssize_t *, Py_ssize_t, int, char); /*proto*/
3455 : static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *, __Pyx_memviewslice *, char, int); /*proto*/
3456 : static int __pyx_memoryview_err_extents(int, Py_ssize_t, Py_ssize_t); /*proto*/
3457 : static int __pyx_memoryview_err_dim(PyObject *, PyObject *, int); /*proto*/
3458 : static int __pyx_memoryview_err(PyObject *, PyObject *); /*proto*/
3459 : static int __pyx_memoryview_err_no_memory(void); /*proto*/
3460 : static int __pyx_memoryview_copy_contents(__Pyx_memviewslice, __Pyx_memviewslice, int, int, int); /*proto*/
3461 : static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *, int, int); /*proto*/
3462 : static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *, int, int, int); /*proto*/
3463 : static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
3464 : static void __pyx_memoryview_refcount_objects_in_slice(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
3465 : static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *, int, size_t, void *, int); /*proto*/
3466 : static void __pyx_memoryview__slice_assign_scalar(char *, Py_ssize_t *, Py_ssize_t *, int, size_t, void *); /*proto*/
3467 : static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *, PyObject *); /*proto*/
3468 : /* #### Code section: typeinfo ### */
3469 : static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_uint32_t = { "uint32_t", NULL, sizeof(__pyx_t_5numpy_uint32_t), { 0 }, 0, __PYX_IS_UNSIGNED(__pyx_t_5numpy_uint32_t) ? 'U' : 'I', __PYX_IS_UNSIGNED(__pyx_t_5numpy_uint32_t), 0 };
3470 : static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_uint64_t = { "uint64_t", NULL, sizeof(__pyx_t_5numpy_uint64_t), { 0 }, 0, __PYX_IS_UNSIGNED(__pyx_t_5numpy_uint64_t) ? 'U' : 'I', __PYX_IS_UNSIGNED(__pyx_t_5numpy_uint64_t), 0 };
3471 : static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_uint32_t__const__ = { "const uint32_t", NULL, sizeof(__pyx_t_5numpy_uint32_t const ), { 0 }, 0, __PYX_IS_UNSIGNED(__pyx_t_5numpy_uint32_t const ) ? 'U' : 'I', __PYX_IS_UNSIGNED(__pyx_t_5numpy_uint32_t const ), 0 };
3472 : static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_uint64_t__const__ = { "const uint64_t", NULL, sizeof(__pyx_t_5numpy_uint64_t const ), { 0 }, 0, __PYX_IS_UNSIGNED(__pyx_t_5numpy_uint64_t const ) ? 'U' : 'I', __PYX_IS_UNSIGNED(__pyx_t_5numpy_uint64_t const ), 0 };
3473 : static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t = { "float64_t", NULL, sizeof(__pyx_t_5numpy_float64_t), { 0 }, 0, 'R', 0, 0 };
3474 : static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_float_t__const__ = { "const float_t", NULL, sizeof(__pyx_t_5numpy_float_t const ), { 0 }, 0, 'R', 0, 0 };
3475 : static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_float_t = { "float_t", NULL, sizeof(__pyx_t_5numpy_float_t), { 0 }, 0, 'R', 0, 0 };
3476 : static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_intp_t = { "intp_t", NULL, sizeof(__pyx_t_5numpy_intp_t), { 0 }, 0, __PYX_IS_UNSIGNED(__pyx_t_5numpy_intp_t) ? 'U' : 'I', __PYX_IS_UNSIGNED(__pyx_t_5numpy_intp_t), 0 };
3477 : /* #### Code section: before_global_var ### */
3478 : #define __Pyx_MODULE_NAME "scipy.stats._sobol"
3479 : extern int __pyx_module_is_main_scipy__stats___sobol;
3480 : int __pyx_module_is_main_scipy__stats___sobol = 0;
3481 :
3482 : /* Implementation of "scipy.stats._sobol" */
3483 : /* #### Code section: global_var ### */
3484 : static PyObject *__pyx_builtin_TypeError;
3485 : static PyObject *__pyx_builtin_ValueError;
3486 : static PyObject *__pyx_builtin_range;
3487 : static PyObject *__pyx_builtin___import__;
3488 : static PyObject *__pyx_builtin_MemoryError;
3489 : static PyObject *__pyx_builtin_enumerate;
3490 : static PyObject *__pyx_builtin_AssertionError;
3491 : static PyObject *__pyx_builtin_Ellipsis;
3492 : static PyObject *__pyx_builtin_id;
3493 : static PyObject *__pyx_builtin_IndexError;
3494 : static PyObject *__pyx_builtin_ImportError;
3495 : /* #### Code section: string_decls ### */
3496 : static const char __pyx_k_[] = ": ";
3497 : static const char __pyx_k_O[] = "O";
3498 : static const char __pyx_k_c[] = "c";
3499 : static const char __pyx_k_f[] = "f";
3500 : static const char __pyx_k_n[] = "n";
3501 : static const char __pyx_k_p[] = "p";
3502 : static const char __pyx_k_s[] = "s";
3503 : static const char __pyx_k_v[] = "v";
3504 : static const char __pyx_k__2[] = ".";
3505 : static const char __pyx_k__3[] = "*";
3506 : static const char __pyx_k__6[] = "'";
3507 : static const char __pyx_k__7[] = ")";
3508 : static const char __pyx_k_gc[] = "gc";
3509 : static const char __pyx_k_id[] = "id";
3510 : static const char __pyx_k_np[] = "np";
3511 : static const char __pyx_k_sv[] = "sv";
3512 : static const char __pyx_k__16[] = "()";
3513 : static const char __pyx_k__17[] = "|";
3514 : static const char __pyx_k__56[] = "?";
3515 : static const char __pyx_k_abc[] = "abc";
3516 : static const char __pyx_k_and[] = " and ";
3517 : static const char __pyx_k_dim[] = "dim";
3518 : static const char __pyx_k_dns[] = "dns";
3519 : static const char __pyx_k_get[] = "get";
3520 : static const char __pyx_k_got[] = " (got ";
3521 : static const char __pyx_k_ltm[] = "ltm";
3522 : static const char __pyx_k_n_2[] = "n_";
3523 : static const char __pyx_k_new[] = "__new__";
3524 : static const char __pyx_k_obj[] = "obj";
3525 : static const char __pyx_k_sys[] = "sys";
3526 : static const char __pyx_k_args[] = "args";
3527 : static const char __pyx_k_base[] = "base";
3528 : static const char __pyx_k_bits[] = "bits";
3529 : static const char __pyx_k_dict[] = "__dict__";
3530 : static const char __pyx_k_draw[] = "_draw";
3531 : static const char __pyx_k_exit[] = "__exit__";
3532 : static const char __pyx_k_kind[] = "kind";
3533 : static const char __pyx_k_load[] = "load";
3534 : static const char __pyx_k_main[] = "__main__";
3535 : static const char __pyx_k_mode[] = "mode";
3536 : static const char __pyx_k_name[] = "name";
3537 : static const char __pyx_k_ndim[] = "ndim";
3538 : static const char __pyx_k_pack[] = "pack";
3539 : static const char __pyx_k_poly[] = "poly";
3540 : static const char __pyx_k_size[] = "size";
3541 : static const char __pyx_k_spec[] = "__spec__";
3542 : static const char __pyx_k_step[] = "step";
3543 : static const char __pyx_k_stop[] = "stop";
3544 : static const char __pyx_k_test[] = "__test__";
3545 : static const char __pyx_k_ASCII[] = "ASCII";
3546 : static const char __pyx_k_class[] = "__class__";
3547 : static const char __pyx_k_count[] = "count";
3548 : static const char __pyx_k_draws[] = "draws";
3549 : static const char __pyx_k_dtype[] = "dtype";
3550 : static const char __pyx_k_empty[] = "empty";
3551 : static const char __pyx_k_enter[] = "__enter__";
3552 : static const char __pyx_k_error[] = "error";
3553 : static const char __pyx_k_files[] = "files";
3554 : static const char __pyx_k_flags[] = "flags";
3555 : static const char __pyx_k_index[] = "index";
3556 : static const char __pyx_k_numpy[] = "numpy";
3557 : static const char __pyx_k_quasi[] = "quasi";
3558 : static const char __pyx_k_range[] = "range";
3559 : static const char __pyx_k_scale[] = "scale";
3560 : static const char __pyx_k_shape[] = "shape";
3561 : static const char __pyx_k_split[] = "split";
3562 : static const char __pyx_k_start[] = "start";
3563 : static const char __pyx_k_strip[] = "strip";
3564 : static const char __pyx_k_value[] = "value";
3565 : static const char __pyx_k_vinit[] = "vinit";
3566 : static const char __pyx_k_MAXDEG[] = "_MAXDEG";
3567 : static const char __pyx_k_MAXDIM[] = "_MAXDIM";
3568 : static const char __pyx_k_astype[] = "astype";
3569 : static const char __pyx_k_curdir[] = "_curdir";
3570 : static const char __pyx_k_enable[] = "enable";
3571 : static const char __pyx_k_encode[] = "encode";
3572 : static const char __pyx_k_format[] = "format";
3573 : static const char __pyx_k_import[] = "__import__";
3574 : static const char __pyx_k_kwargs[] = "kwargs";
3575 : static const char __pyx_k_name_2[] = "__name__";
3576 : static const char __pyx_k_pickle[] = "pickle";
3577 : static const char __pyx_k_reduce[] = "__reduce__";
3578 : static const char __pyx_k_result[] = "result";
3579 : static const char __pyx_k_sample[] = "sample";
3580 : static const char __pyx_k_struct[] = "struct";
3581 : static const char __pyx_k_uint32[] = "uint32";
3582 : static const char __pyx_k_uint64[] = "uint64";
3583 : static const char __pyx_k_unpack[] = "unpack";
3584 : static const char __pyx_k_update[] = "update";
3585 : static const char __pyx_k_values[] = "values";
3586 : static const char __pyx_k_as_file[] = "as_file";
3587 : static const char __pyx_k_disable[] = "disable";
3588 : static const char __pyx_k_fortran[] = "fortran";
3589 : static const char __pyx_k_memview[] = "memview";
3590 : static const char __pyx_k_npzfile[] = "_npzfile";
3591 : static const char __pyx_k_num_gen[] = "num_gen";
3592 : static const char __pyx_k_Ellipsis[] = "Ellipsis";
3593 : static const char __pyx_k_Sequence[] = "Sequence";
3594 : static const char __pyx_k_defaults[] = "defaults";
3595 : static const char __pyx_k_dns_poly[] = "dns_poly";
3596 : static const char __pyx_k_getstate[] = "__getstate__";
3597 : static const char __pyx_k_itemsize[] = "itemsize";
3598 : static const char __pyx_k_joinpath[] = "joinpath";
3599 : static const char __pyx_k_pyx_type[] = "__pyx_type";
3600 : static const char __pyx_k_register[] = "register";
3601 : static const char __pyx_k_setstate[] = "__setstate__";
3602 : static const char __pyx_k_uint32_t[] = "uint32_t";
3603 : static const char __pyx_k_uint64_t[] = "uint64_t";
3604 : static const char __pyx_k_TypeError[] = "TypeError";
3605 : static const char __pyx_k_cscramble[] = "_cscramble";
3606 : static const char __pyx_k_dns_vinit[] = "dns_vinit";
3607 : static const char __pyx_k_enumerate[] = "enumerate";
3608 : static const char __pyx_k_importlib[] = "importlib";
3609 : static const char __pyx_k_isenabled[] = "isenabled";
3610 : static const char __pyx_k_num_gen_2[] = "num_gen_";
3611 : static const char __pyx_k_poly_dict[] = "_poly_dict";
3612 : static const char __pyx_k_pyx_state[] = "__pyx_state";
3613 : static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
3614 : static const char __pyx_k_resources[] = "resources";
3615 : static const char __pyx_k_IndexError[] = "IndexError";
3616 : static const char __pyx_k_ValueError[] = "ValueError";
3617 : static const char __pyx_k_categorize[] = "_categorize";
3618 : static const char __pyx_k_poly_vinit[] = "poly_vinit";
3619 : static const char __pyx_k_pyx_result[] = "__pyx_result";
3620 : static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
3621 : static const char __pyx_k_signatures[] = "signatures";
3622 : static const char __pyx_k_vinit_dict[] = "_vinit_dict";
3623 : static const char __pyx_k_ImportError[] = "ImportError";
3624 : static const char __pyx_k_MemoryError[] = "MemoryError";
3625 : static const char __pyx_k_PickleError[] = "PickleError";
3626 : static const char __pyx_k_collections[] = "collections";
3627 : static const char __pyx_k_scipy_stats[] = "scipy.stats";
3628 : static const char __pyx_k_fast_forward[] = "_fast_forward";
3629 : static const char __pyx_k_initialize_v[] = "_initialize_v";
3630 : static const char __pyx_k_initializing[] = "_initializing";
3631 : static const char __pyx_k_is_coroutine[] = "_is_coroutine";
3632 : static const char __pyx_k_p_cumulative[] = "p_cumulative";
3633 : static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
3634 : static const char __pyx_k_stringsource[] = "<stringsource>";
3635 : static const char __pyx_k_version_info[] = "version_info";
3636 : static const char __pyx_k_class_getitem[] = "__class_getitem__";
3637 : static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
3638 : static const char __pyx_k_AssertionError[] = "AssertionError";
3639 : static const char __pyx_k_fused_sigindex[] = "_fused_sigindex";
3640 : static const char __pyx_k_get_poly_vinit[] = "get_poly_vinit";
3641 : static const char __pyx_k_View_MemoryView[] = "View.MemoryView";
3642 : static const char __pyx_k_allocate_buffer[] = "allocate_buffer";
3643 : static const char __pyx_k_collections_abc[] = "collections.abc";
3644 : static const char __pyx_k_dtype_is_object[] = "dtype_is_object";
3645 : static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
3646 : static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
3647 : static const char __pyx_k_test_find_index[] = "_test_find_index";
3648 : static const char __pyx_k_fill_p_cumulative[] = "_fill_p_cumulative";
3649 : static const char __pyx_k_pyx_unpickle_Enum[] = "__pyx_unpickle_Enum";
3650 : static const char __pyx_k_asyncio_coroutines[] = "asyncio.coroutines";
3651 : static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
3652 : static const char __pyx_k_scipy_stats__sobol[] = "scipy.stats._sobol";
3653 : static const char __pyx_k_strided_and_direct[] = "<strided and direct>";
3654 : static const char __pyx_k_importlib_resources[] = "importlib.resources";
3655 : static const char __pyx_k_pyx_fuse_0_cscramble[] = "__pyx_fuse_0_cscramble";
3656 : static const char __pyx_k_pyx_fuse_1_cscramble[] = "__pyx_fuse_1_cscramble";
3657 : static const char __pyx_k_strided_and_indirect[] = "<strided and indirect>";
3658 : static const char __pyx_k_Invalid_shape_in_axis[] = "Invalid shape in axis ";
3659 : static const char __pyx_k_contiguous_and_direct[] = "<contiguous and direct>";
3660 : static const char __pyx_k_Cannot_index_with_type[] = "Cannot index with type '";
3661 : static const char __pyx_k_MemoryView_of_r_object[] = "<MemoryView of %r object>";
3662 : static const char __pyx_k_MemoryView_of_r_at_0x_x[] = "<MemoryView of %r at 0x%x>";
3663 : static const char __pyx_k_contiguous_and_indirect[] = "<contiguous and indirect>";
3664 : static const char __pyx_k_pyx_fuse_0_fast_forward[] = "__pyx_fuse_0_fast_forward";
3665 : static const char __pyx_k_pyx_fuse_0_initialize_v[] = "__pyx_fuse_0_initialize_v";
3666 : static const char __pyx_k_pyx_fuse_1_fast_forward[] = "__pyx_fuse_1_fast_forward";
3667 : static const char __pyx_k_pyx_fuse_1_initialize_v[] = "__pyx_fuse_1_initialize_v";
3668 : static const char __pyx_k_Dimension_d_is_not_direct[] = "Dimension %d is not direct";
3669 : static const char __pyx_k_Index_out_of_bounds_axis_d[] = "Index out of bounds (axis %d)";
3670 : static const char __pyx_k_No_matching_signature_found[] = "No matching signature found";
3671 : static const char __pyx_k_Step_may_not_be_zero_axis_d[] = "Step may not be zero (axis %d)";
3672 : static const char __pyx_k_itemsize_0_for_cython_array[] = "itemsize <= 0 for cython.array";
3673 : static const char __pyx_k_sobol_direction_numbers_npz[] = "_sobol_direction_numbers.npz";
3674 : static const char __pyx_k_initialize_direction_numbers[] = "_initialize_direction_numbers";
3675 : static const char __pyx_k_unable_to_allocate_array_data[] = "unable to allocate array data.";
3676 : static const char __pyx_k_strided_and_direct_or_indirect[] = "<strided and direct or indirect>";
3677 : static const char __pyx_k_home_czgdp18079_Quansight_scipy[] = "/home/czgdp18079/Quansight/scipy/scipy/stats/_sobol.pyx";
3678 : static const char __pyx_k_All_dimensions_preceding_dimensi[] = "All dimensions preceding dimension %d must be indexed and not sliced";
3679 : static const char __pyx_k_Buffer_view_does_not_expose_stri[] = "Buffer view does not expose strides";
3680 : static const char __pyx_k_Can_only_create_a_buffer_that_is[] = "Can only create a buffer that is contiguous in memory.";
3681 : static const char __pyx_k_Cannot_assign_to_read_only_memor[] = "Cannot assign to read-only memoryview";
3682 : static const char __pyx_k_Cannot_create_writable_memory_vi[] = "Cannot create writable memory view from read-only memoryview";
3683 : static const char __pyx_k_Cannot_transpose_memoryview_with[] = "Cannot transpose memoryview with indirect dimensions";
3684 : static const char __pyx_k_Empty_shape_tuple_for_cython_arr[] = "Empty shape tuple for cython.array";
3685 : static const char __pyx_k_Expected_at_least_d_argument_s_g[] = "Expected at least %d argument%s, got %d";
3686 : static const char __pyx_k_Function_call_with_ambiguous_arg[] = "Function call with ambiguous argument types";
3687 : static const char __pyx_k_Incompatible_checksums_0x_x_vs_0[] = "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))";
3688 : static const char __pyx_k_Indirect_dimensions_not_supporte[] = "Indirect dimensions not supported";
3689 : static const char __pyx_k_Invalid_mode_expected_c_or_fortr[] = "Invalid mode, expected 'c' or 'fortran', got ";
3690 : static const char __pyx_k_Out_of_bounds_on_buffer_access_a[] = "Out of bounds on buffer access (axis ";
3691 : static const char __pyx_k_Unable_to_convert_item_to_object[] = "Unable to convert item to object";
3692 : static const char __pyx_k_got_differing_extents_in_dimensi[] = "got differing extents in dimension ";
3693 : static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
3694 : static const char __pyx_k_numpy__core_multiarray_failed_to[] = "numpy._core.multiarray failed to import";
3695 : static const char __pyx_k_numpy__core_umath_failed_to_impo[] = "numpy._core.umath failed to import";
3696 : static const char __pyx_k_unable_to_allocate_shape_and_str[] = "unable to allocate shape and strides.";
3697 : /* #### Code section: decls ### */
3698 : static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer); /* proto */
3699 : static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
3700 : static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self); /* proto */
3701 : static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self); /* proto */
3702 : static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self); /* proto */
3703 : static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr); /* proto */
3704 : static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item); /* proto */
3705 : static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /* proto */
3706 : static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self); /* proto */
3707 : static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
3708 : static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
3709 : static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
3710 : static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
3711 : static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
3712 : static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object); /* proto */
3713 : static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3714 : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
3715 : static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto */
3716 : static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
3717 : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3718 : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3719 : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3720 : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3721 : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3722 : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3723 : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3724 : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3725 : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3726 : static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3727 : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3728 : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3729 : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3730 : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3731 : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3732 : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3733 : static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3734 : static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
3735 : static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
3736 : static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
3737 : static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
3738 : static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
3739 : static PyObject *__pyx_pf_5scipy_5stats_6_sobol_get_poly_vinit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_kind, PyObject *__pyx_v_dtype); /* proto */
3740 : static PyObject *__pyx_pf_5scipy_5stats_6_sobol_2_initialize_direction_numbers(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_poly, PyObject *__pyx_v_vinit, PyObject *__pyx_v_dtype); /* proto */
3741 : static PyObject *__pyx_pf_5scipy_5stats_6_sobol_4_initialize_v(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_signatures, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, CYTHON_UNUSED PyObject *__pyx_v_defaults, PyObject *__pyx_v__fused_sigindex); /* proto */
3742 : static PyObject *__pyx_pf_5scipy_5stats_6_sobol_18__pyx_fuse_0_initialize_v(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_v, int __pyx_v_dim, int __pyx_v_bits); /* proto */
3743 : static PyObject *__pyx_pf_5scipy_5stats_6_sobol_20__pyx_fuse_1_initialize_v(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_v, int __pyx_v_dim, int __pyx_v_bits); /* proto */
3744 : static PyObject *__pyx_pf_5scipy_5stats_6_sobol_6_draw(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_signatures, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, CYTHON_UNUSED PyObject *__pyx_v_defaults, PyObject *__pyx_v__fused_sigindex); /* proto */
3745 : static PyObject *__pyx_pf_5scipy_5stats_6_sobol_24_draw(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n, PyObject *__pyx_v_num_gen, int __pyx_v_dim, __pyx_t_5numpy_float64_t __pyx_v_scale, __Pyx_memviewslice __pyx_v_sv, __Pyx_memviewslice __pyx_v_quasi, __Pyx_memviewslice __pyx_v_sample); /* proto */
3746 : static PyObject *__pyx_pf_5scipy_5stats_6_sobol_26_draw(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n, PyObject *__pyx_v_num_gen, int __pyx_v_dim, __pyx_t_5numpy_float64_t __pyx_v_scale, __Pyx_memviewslice __pyx_v_sv, __Pyx_memviewslice __pyx_v_quasi, __Pyx_memviewslice __pyx_v_sample); /* proto */
3747 : static PyObject *__pyx_pf_5scipy_5stats_6_sobol_8_fast_forward(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_signatures, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, CYTHON_UNUSED PyObject *__pyx_v_defaults, PyObject *__pyx_v__fused_sigindex); /* proto */
3748 : static PyObject *__pyx_pf_5scipy_5stats_6_sobol_30__pyx_fuse_0_fast_forward(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_uint32_t __pyx_v_n, __pyx_t_5numpy_uint32_t __pyx_v_num_gen, int __pyx_v_dim, __Pyx_memviewslice __pyx_v_sv, __Pyx_memviewslice __pyx_v_quasi); /* proto */
3749 : static PyObject *__pyx_pf_5scipy_5stats_6_sobol_32__pyx_fuse_1_fast_forward(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_uint64_t __pyx_v_n, __pyx_t_5numpy_uint64_t __pyx_v_num_gen, int __pyx_v_dim, __Pyx_memviewslice __pyx_v_sv, __Pyx_memviewslice __pyx_v_quasi); /* proto */
3750 : static PyObject *__pyx_pf_5scipy_5stats_6_sobol_10_cscramble(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_signatures, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, CYTHON_UNUSED PyObject *__pyx_v_defaults, PyObject *__pyx_v__fused_sigindex); /* proto */
3751 : static PyObject *__pyx_pf_5scipy_5stats_6_sobol_36__pyx_fuse_0_cscramble(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_dim, int __pyx_v_bits, __Pyx_memviewslice __pyx_v_ltm, __Pyx_memviewslice __pyx_v_sv); /* proto */
3752 : static PyObject *__pyx_pf_5scipy_5stats_6_sobol_38__pyx_fuse_1_cscramble(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_dim, int __pyx_v_bits, __Pyx_memviewslice __pyx_v_ltm, __Pyx_memviewslice __pyx_v_sv); /* proto */
3753 : static PyObject *__pyx_pf_5scipy_5stats_6_sobol_12_fill_p_cumulative(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_p, __Pyx_memviewslice __pyx_v_p_cumulative); /* proto */
3754 : static PyObject *__pyx_pf_5scipy_5stats_6_sobol_14_categorize(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_draws, __Pyx_memviewslice __pyx_v_p_cumulative, __Pyx_memviewslice __pyx_v_result); /* proto */
3755 : static PyObject *__pyx_pf_5scipy_5stats_6_sobol_16_test_find_index(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p_cumulative, PyObject *__pyx_v_size, PyObject *__pyx_v_value); /* proto */
3756 : static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3757 : static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3758 : static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3759 : static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3760 : static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_get = {0, 0, 0, 0, 0};
3761 : static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_values = {0, 0, 0, 0, 0};
3762 : /* #### Code section: late_includes ### */
3763 : /* #### Code section: module_state ### */
3764 : typedef struct {
3765 : PyObject *__pyx_d;
3766 : PyObject *__pyx_b;
3767 : PyObject *__pyx_cython_runtime;
3768 : PyObject *__pyx_empty_tuple;
3769 : PyObject *__pyx_empty_bytes;
3770 : PyObject *__pyx_empty_unicode;
3771 : #ifdef __Pyx_CyFunction_USED
3772 : PyTypeObject *__pyx_CyFunctionType;
3773 : #endif
3774 : #ifdef __Pyx_FusedFunction_USED
3775 : PyTypeObject *__pyx_FusedFunctionType;
3776 : #endif
3777 : #ifdef __Pyx_Generator_USED
3778 : PyTypeObject *__pyx_GeneratorType;
3779 : #endif
3780 : #ifdef __Pyx_IterableCoroutine_USED
3781 : PyTypeObject *__pyx_IterableCoroutineType;
3782 : #endif
3783 : #ifdef __Pyx_Coroutine_USED
3784 : PyTypeObject *__pyx_CoroutineAwaitType;
3785 : #endif
3786 : #ifdef __Pyx_Coroutine_USED
3787 : PyTypeObject *__pyx_CoroutineType;
3788 : #endif
3789 : #if CYTHON_USE_MODULE_STATE
3790 : #endif
3791 : #if CYTHON_USE_MODULE_STATE
3792 : #endif
3793 : #if CYTHON_USE_MODULE_STATE
3794 : #endif
3795 : #if CYTHON_USE_MODULE_STATE
3796 : #endif
3797 : #if CYTHON_USE_MODULE_STATE
3798 : #endif
3799 : #if CYTHON_USE_MODULE_STATE
3800 : #endif
3801 : #if CYTHON_USE_MODULE_STATE
3802 : #endif
3803 : PyTypeObject *__pyx_ptype_7cpython_4type_type;
3804 : #if CYTHON_USE_MODULE_STATE
3805 : #endif
3806 : #if CYTHON_USE_MODULE_STATE
3807 : #endif
3808 : #if CYTHON_USE_MODULE_STATE
3809 : #endif
3810 : #if CYTHON_USE_MODULE_STATE
3811 : #endif
3812 : #if CYTHON_USE_MODULE_STATE
3813 : #endif
3814 : PyTypeObject *__pyx_ptype_5numpy_dtype;
3815 : PyTypeObject *__pyx_ptype_5numpy_flatiter;
3816 : PyTypeObject *__pyx_ptype_5numpy_broadcast;
3817 : PyTypeObject *__pyx_ptype_5numpy_ndarray;
3818 : PyTypeObject *__pyx_ptype_5numpy_generic;
3819 : PyTypeObject *__pyx_ptype_5numpy_number;
3820 : PyTypeObject *__pyx_ptype_5numpy_integer;
3821 : PyTypeObject *__pyx_ptype_5numpy_signedinteger;
3822 : PyTypeObject *__pyx_ptype_5numpy_unsignedinteger;
3823 : PyTypeObject *__pyx_ptype_5numpy_inexact;
3824 : PyTypeObject *__pyx_ptype_5numpy_floating;
3825 : PyTypeObject *__pyx_ptype_5numpy_complexfloating;
3826 : PyTypeObject *__pyx_ptype_5numpy_flexible;
3827 : PyTypeObject *__pyx_ptype_5numpy_character;
3828 : PyTypeObject *__pyx_ptype_5numpy_ufunc;
3829 : #if CYTHON_USE_MODULE_STATE
3830 : PyObject *__pyx_type___pyx_array;
3831 : PyObject *__pyx_type___pyx_MemviewEnum;
3832 : PyObject *__pyx_type___pyx_memoryview;
3833 : PyObject *__pyx_type___pyx_memoryviewslice;
3834 : #endif
3835 : PyTypeObject *__pyx_array_type;
3836 : PyTypeObject *__pyx_MemviewEnum_type;
3837 : PyTypeObject *__pyx_memoryview_type;
3838 : PyTypeObject *__pyx_memoryviewslice_type;
3839 : PyObject *__pyx_kp_u_;
3840 : PyObject *__pyx_n_s_ASCII;
3841 : PyObject *__pyx_kp_s_All_dimensions_preceding_dimensi;
3842 : PyObject *__pyx_n_s_AssertionError;
3843 : PyObject *__pyx_kp_s_Buffer_view_does_not_expose_stri;
3844 : PyObject *__pyx_kp_s_Can_only_create_a_buffer_that_is;
3845 : PyObject *__pyx_kp_s_Cannot_assign_to_read_only_memor;
3846 : PyObject *__pyx_kp_s_Cannot_create_writable_memory_vi;
3847 : PyObject *__pyx_kp_u_Cannot_index_with_type;
3848 : PyObject *__pyx_kp_s_Cannot_transpose_memoryview_with;
3849 : PyObject *__pyx_kp_s_Dimension_d_is_not_direct;
3850 : PyObject *__pyx_n_s_Ellipsis;
3851 : PyObject *__pyx_kp_s_Empty_shape_tuple_for_cython_arr;
3852 : PyObject *__pyx_kp_s_Expected_at_least_d_argument_s_g;
3853 : PyObject *__pyx_kp_s_Function_call_with_ambiguous_arg;
3854 : PyObject *__pyx_n_s_ImportError;
3855 : PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0;
3856 : PyObject *__pyx_n_s_IndexError;
3857 : PyObject *__pyx_kp_s_Index_out_of_bounds_axis_d;
3858 : PyObject *__pyx_kp_s_Indirect_dimensions_not_supporte;
3859 : PyObject *__pyx_kp_u_Invalid_mode_expected_c_or_fortr;
3860 : PyObject *__pyx_kp_u_Invalid_shape_in_axis;
3861 : PyObject *__pyx_n_s_MAXDEG;
3862 : PyObject *__pyx_n_s_MAXDIM;
3863 : PyObject *__pyx_n_s_MemoryError;
3864 : PyObject *__pyx_kp_s_MemoryView_of_r_at_0x_x;
3865 : PyObject *__pyx_kp_s_MemoryView_of_r_object;
3866 : PyObject *__pyx_kp_s_No_matching_signature_found;
3867 : PyObject *__pyx_n_b_O;
3868 : PyObject *__pyx_kp_u_Out_of_bounds_on_buffer_access_a;
3869 : PyObject *__pyx_n_s_PickleError;
3870 : PyObject *__pyx_n_s_Sequence;
3871 : PyObject *__pyx_kp_s_Step_may_not_be_zero_axis_d;
3872 : PyObject *__pyx_n_s_TypeError;
3873 : PyObject *__pyx_kp_s_Unable_to_convert_item_to_object;
3874 : PyObject *__pyx_n_s_ValueError;
3875 : PyObject *__pyx_n_s_View_MemoryView;
3876 : PyObject *__pyx_kp_s__16;
3877 : PyObject *__pyx_kp_s__17;
3878 : PyObject *__pyx_kp_u__17;
3879 : PyObject *__pyx_kp_u__2;
3880 : PyObject *__pyx_n_s__3;
3881 : PyObject *__pyx_n_s__56;
3882 : PyObject *__pyx_kp_u__6;
3883 : PyObject *__pyx_kp_u__7;
3884 : PyObject *__pyx_n_s_abc;
3885 : PyObject *__pyx_n_s_allocate_buffer;
3886 : PyObject *__pyx_kp_u_and;
3887 : PyObject *__pyx_n_s_args;
3888 : PyObject *__pyx_n_s_as_file;
3889 : PyObject *__pyx_n_s_astype;
3890 : PyObject *__pyx_n_s_asyncio_coroutines;
3891 : PyObject *__pyx_n_s_base;
3892 : PyObject *__pyx_n_s_bits;
3893 : PyObject *__pyx_n_s_c;
3894 : PyObject *__pyx_n_u_c;
3895 : PyObject *__pyx_n_s_categorize;
3896 : PyObject *__pyx_n_s_class;
3897 : PyObject *__pyx_n_s_class_getitem;
3898 : PyObject *__pyx_n_s_cline_in_traceback;
3899 : PyObject *__pyx_n_s_collections;
3900 : PyObject *__pyx_kp_s_collections_abc;
3901 : PyObject *__pyx_kp_s_contiguous_and_direct;
3902 : PyObject *__pyx_kp_s_contiguous_and_indirect;
3903 : PyObject *__pyx_n_s_count;
3904 : PyObject *__pyx_n_s_cscramble;
3905 : PyObject *__pyx_n_s_curdir;
3906 : PyObject *__pyx_n_s_defaults;
3907 : PyObject *__pyx_n_s_dict;
3908 : PyObject *__pyx_n_s_dim;
3909 : PyObject *__pyx_kp_u_disable;
3910 : PyObject *__pyx_n_s_dns;
3911 : PyObject *__pyx_n_s_dns_poly;
3912 : PyObject *__pyx_n_s_dns_vinit;
3913 : PyObject *__pyx_n_s_draw;
3914 : PyObject *__pyx_n_s_draws;
3915 : PyObject *__pyx_n_s_dtype;
3916 : PyObject *__pyx_n_s_dtype_is_object;
3917 : PyObject *__pyx_n_s_empty;
3918 : PyObject *__pyx_kp_u_enable;
3919 : PyObject *__pyx_n_s_encode;
3920 : PyObject *__pyx_n_s_enter;
3921 : PyObject *__pyx_n_s_enumerate;
3922 : PyObject *__pyx_n_s_error;
3923 : PyObject *__pyx_n_s_exit;
3924 : PyObject *__pyx_n_s_f;
3925 : PyObject *__pyx_n_s_fast_forward;
3926 : PyObject *__pyx_n_s_files;
3927 : PyObject *__pyx_n_s_fill_p_cumulative;
3928 : PyObject *__pyx_n_s_flags;
3929 : PyObject *__pyx_n_s_format;
3930 : PyObject *__pyx_n_s_fortran;
3931 : PyObject *__pyx_n_u_fortran;
3932 : PyObject *__pyx_n_s_fused_sigindex;
3933 : PyObject *__pyx_kp_u_gc;
3934 : PyObject *__pyx_n_s_get;
3935 : PyObject *__pyx_n_s_get_poly_vinit;
3936 : PyObject *__pyx_n_s_getstate;
3937 : PyObject *__pyx_kp_u_got;
3938 : PyObject *__pyx_kp_u_got_differing_extents_in_dimensi;
3939 : PyObject *__pyx_kp_s_home_czgdp18079_Quansight_scipy;
3940 : PyObject *__pyx_n_s_id;
3941 : PyObject *__pyx_n_s_import;
3942 : PyObject *__pyx_n_s_importlib;
3943 : PyObject *__pyx_n_s_importlib_resources;
3944 : PyObject *__pyx_n_s_index;
3945 : PyObject *__pyx_n_s_initialize_direction_numbers;
3946 : PyObject *__pyx_n_s_initialize_v;
3947 : PyObject *__pyx_n_s_initializing;
3948 : PyObject *__pyx_n_s_is_coroutine;
3949 : PyObject *__pyx_kp_u_isenabled;
3950 : PyObject *__pyx_n_s_itemsize;
3951 : PyObject *__pyx_kp_s_itemsize_0_for_cython_array;
3952 : PyObject *__pyx_n_s_joinpath;
3953 : PyObject *__pyx_n_s_kind;
3954 : PyObject *__pyx_n_s_kwargs;
3955 : PyObject *__pyx_n_s_load;
3956 : PyObject *__pyx_n_s_ltm;
3957 : PyObject *__pyx_n_s_main;
3958 : PyObject *__pyx_n_s_memview;
3959 : PyObject *__pyx_n_s_mode;
3960 : PyObject *__pyx_n_s_n;
3961 : PyObject *__pyx_n_s_n_2;
3962 : PyObject *__pyx_n_s_name;
3963 : PyObject *__pyx_n_s_name_2;
3964 : PyObject *__pyx_n_s_ndim;
3965 : PyObject *__pyx_n_s_new;
3966 : PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
3967 : PyObject *__pyx_n_s_np;
3968 : PyObject *__pyx_n_s_npzfile;
3969 : PyObject *__pyx_n_s_num_gen;
3970 : PyObject *__pyx_n_s_num_gen_2;
3971 : PyObject *__pyx_n_s_numpy;
3972 : PyObject *__pyx_kp_u_numpy__core_multiarray_failed_to;
3973 : PyObject *__pyx_kp_u_numpy__core_umath_failed_to_impo;
3974 : PyObject *__pyx_n_s_obj;
3975 : PyObject *__pyx_n_s_p;
3976 : PyObject *__pyx_n_s_p_cumulative;
3977 : PyObject *__pyx_n_s_pack;
3978 : PyObject *__pyx_n_s_pickle;
3979 : PyObject *__pyx_n_s_poly;
3980 : PyObject *__pyx_n_u_poly;
3981 : PyObject *__pyx_n_s_poly_dict;
3982 : PyObject *__pyx_n_s_poly_vinit;
3983 : PyObject *__pyx_n_s_pyx_PickleError;
3984 : PyObject *__pyx_n_s_pyx_checksum;
3985 : PyObject *__pyx_n_s_pyx_fuse_0_cscramble;
3986 : PyObject *__pyx_n_s_pyx_fuse_0_fast_forward;
3987 : PyObject *__pyx_n_s_pyx_fuse_0_initialize_v;
3988 : PyObject *__pyx_n_s_pyx_fuse_1_cscramble;
3989 : PyObject *__pyx_n_s_pyx_fuse_1_fast_forward;
3990 : PyObject *__pyx_n_s_pyx_fuse_1_initialize_v;
3991 : PyObject *__pyx_n_s_pyx_result;
3992 : PyObject *__pyx_n_s_pyx_state;
3993 : PyObject *__pyx_n_s_pyx_type;
3994 : PyObject *__pyx_n_s_pyx_unpickle_Enum;
3995 : PyObject *__pyx_n_s_pyx_vtable;
3996 : PyObject *__pyx_n_s_quasi;
3997 : PyObject *__pyx_n_s_range;
3998 : PyObject *__pyx_n_s_reduce;
3999 : PyObject *__pyx_n_s_reduce_cython;
4000 : PyObject *__pyx_n_s_reduce_ex;
4001 : PyObject *__pyx_n_s_register;
4002 : PyObject *__pyx_n_s_resources;
4003 : PyObject *__pyx_n_s_result;
4004 : PyObject *__pyx_n_s_s;
4005 : PyObject *__pyx_n_s_sample;
4006 : PyObject *__pyx_n_s_scale;
4007 : PyObject *__pyx_kp_u_scipy_stats;
4008 : PyObject *__pyx_n_s_scipy_stats__sobol;
4009 : PyObject *__pyx_n_s_setstate;
4010 : PyObject *__pyx_n_s_setstate_cython;
4011 : PyObject *__pyx_n_s_shape;
4012 : PyObject *__pyx_n_s_signatures;
4013 : PyObject *__pyx_n_s_size;
4014 : PyObject *__pyx_kp_u_sobol_direction_numbers_npz;
4015 : PyObject *__pyx_n_s_spec;
4016 : PyObject *__pyx_n_s_split;
4017 : PyObject *__pyx_n_s_start;
4018 : PyObject *__pyx_n_s_step;
4019 : PyObject *__pyx_n_s_stop;
4020 : PyObject *__pyx_kp_s_strided_and_direct;
4021 : PyObject *__pyx_kp_s_strided_and_direct_or_indirect;
4022 : PyObject *__pyx_kp_s_strided_and_indirect;
4023 : PyObject *__pyx_kp_s_stringsource;
4024 : PyObject *__pyx_n_s_strip;
4025 : PyObject *__pyx_n_s_struct;
4026 : PyObject *__pyx_n_s_sv;
4027 : PyObject *__pyx_n_s_sys;
4028 : PyObject *__pyx_n_s_test;
4029 : PyObject *__pyx_n_s_test_find_index;
4030 : PyObject *__pyx_n_s_uint32;
4031 : PyObject *__pyx_n_s_uint32_t;
4032 : PyObject *__pyx_n_s_uint64;
4033 : PyObject *__pyx_n_s_uint64_t;
4034 : PyObject *__pyx_kp_s_unable_to_allocate_array_data;
4035 : PyObject *__pyx_kp_s_unable_to_allocate_shape_and_str;
4036 : PyObject *__pyx_n_s_unpack;
4037 : PyObject *__pyx_n_s_update;
4038 : PyObject *__pyx_n_s_v;
4039 : PyObject *__pyx_n_s_value;
4040 : PyObject *__pyx_n_s_values;
4041 : PyObject *__pyx_n_s_version_info;
4042 : PyObject *__pyx_n_s_vinit;
4043 : PyObject *__pyx_n_u_vinit;
4044 : PyObject *__pyx_n_s_vinit_dict;
4045 : PyObject *__pyx_int_0;
4046 : PyObject *__pyx_int_1;
4047 : PyObject *__pyx_int_3;
4048 : PyObject *__pyx_int_4;
4049 : PyObject *__pyx_int_5;
4050 : PyObject *__pyx_int_7;
4051 : PyObject *__pyx_int_18;
4052 : PyObject *__pyx_int_21201;
4053 : PyObject *__pyx_int_112105877;
4054 : PyObject *__pyx_int_136983863;
4055 : PyObject *__pyx_int_184977713;
4056 : PyObject *__pyx_int_neg_1;
4057 : PyObject *__pyx_slice__5;
4058 : PyObject *__pyx_tuple__4;
4059 : PyObject *__pyx_tuple__8;
4060 : PyObject *__pyx_tuple__9;
4061 : PyObject *__pyx_tuple__10;
4062 : PyObject *__pyx_tuple__11;
4063 : PyObject *__pyx_tuple__12;
4064 : PyObject *__pyx_tuple__13;
4065 : PyObject *__pyx_tuple__14;
4066 : PyObject *__pyx_tuple__15;
4067 : PyObject *__pyx_tuple__18;
4068 : PyObject *__pyx_tuple__19;
4069 : PyObject *__pyx_tuple__20;
4070 : PyObject *__pyx_tuple__21;
4071 : PyObject *__pyx_tuple__22;
4072 : PyObject *__pyx_tuple__23;
4073 : PyObject *__pyx_tuple__24;
4074 : PyObject *__pyx_tuple__25;
4075 : PyObject *__pyx_tuple__26;
4076 : PyObject *__pyx_tuple__27;
4077 : PyObject *__pyx_tuple__28;
4078 : PyObject *__pyx_tuple__29;
4079 : PyObject *__pyx_tuple__31;
4080 : PyObject *__pyx_tuple__32;
4081 : PyObject *__pyx_tuple__34;
4082 : PyObject *__pyx_tuple__36;
4083 : PyObject *__pyx_tuple__40;
4084 : PyObject *__pyx_tuple__42;
4085 : PyObject *__pyx_tuple__46;
4086 : PyObject *__pyx_tuple__50;
4087 : PyObject *__pyx_tuple__52;
4088 : PyObject *__pyx_tuple__54;
4089 : PyObject *__pyx_codeobj__30;
4090 : PyObject *__pyx_codeobj__33;
4091 : PyObject *__pyx_codeobj__35;
4092 : PyObject *__pyx_codeobj__37;
4093 : PyObject *__pyx_codeobj__38;
4094 : PyObject *__pyx_codeobj__39;
4095 : PyObject *__pyx_codeobj__41;
4096 : PyObject *__pyx_codeobj__43;
4097 : PyObject *__pyx_codeobj__44;
4098 : PyObject *__pyx_codeobj__45;
4099 : PyObject *__pyx_codeobj__47;
4100 : PyObject *__pyx_codeobj__48;
4101 : PyObject *__pyx_codeobj__49;
4102 : PyObject *__pyx_codeobj__51;
4103 : PyObject *__pyx_codeobj__53;
4104 : PyObject *__pyx_codeobj__55;
4105 : } __pyx_mstate;
4106 :
4107 : #if CYTHON_USE_MODULE_STATE
4108 : #ifdef __cplusplus
4109 : namespace {
4110 : extern struct PyModuleDef __pyx_moduledef;
4111 : } /* anonymous namespace */
4112 : #else
4113 : static struct PyModuleDef __pyx_moduledef;
4114 : #endif
4115 :
4116 : #define __pyx_mstate(o) ((__pyx_mstate *)__Pyx_PyModule_GetState(o))
4117 :
4118 : #define __pyx_mstate_global (__pyx_mstate(PyState_FindModule(&__pyx_moduledef)))
4119 :
4120 : #define __pyx_m (PyState_FindModule(&__pyx_moduledef))
4121 : #else
4122 : static __pyx_mstate __pyx_mstate_global_static =
4123 : #ifdef __cplusplus
4124 : {};
4125 : #else
4126 : {0};
4127 : #endif
4128 : static __pyx_mstate *__pyx_mstate_global = &__pyx_mstate_global_static;
4129 : #endif
4130 : /* #### Code section: module_state_clear ### */
4131 : #if CYTHON_USE_MODULE_STATE
4132 : static int __pyx_m_clear(PyObject *m) {
4133 : __pyx_mstate *clear_module_state = __pyx_mstate(m);
4134 : if (!clear_module_state) return 0;
4135 : Py_CLEAR(clear_module_state->__pyx_d);
4136 : Py_CLEAR(clear_module_state->__pyx_b);
4137 : Py_CLEAR(clear_module_state->__pyx_cython_runtime);
4138 : Py_CLEAR(clear_module_state->__pyx_empty_tuple);
4139 : Py_CLEAR(clear_module_state->__pyx_empty_bytes);
4140 : Py_CLEAR(clear_module_state->__pyx_empty_unicode);
4141 : #ifdef __Pyx_CyFunction_USED
4142 : Py_CLEAR(clear_module_state->__pyx_CyFunctionType);
4143 : #endif
4144 : #ifdef __Pyx_FusedFunction_USED
4145 : Py_CLEAR(clear_module_state->__pyx_FusedFunctionType);
4146 : #endif
4147 : Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4type_type);
4148 : Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_dtype);
4149 : Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_flatiter);
4150 : Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_broadcast);
4151 : Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_ndarray);
4152 : Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_generic);
4153 : Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_number);
4154 : Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_integer);
4155 : Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_signedinteger);
4156 : Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_unsignedinteger);
4157 : Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_inexact);
4158 : Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_floating);
4159 : Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_complexfloating);
4160 : Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_flexible);
4161 : Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_character);
4162 : Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_ufunc);
4163 : Py_CLEAR(clear_module_state->__pyx_array_type);
4164 : Py_CLEAR(clear_module_state->__pyx_type___pyx_array);
4165 : Py_CLEAR(clear_module_state->__pyx_MemviewEnum_type);
4166 : Py_CLEAR(clear_module_state->__pyx_type___pyx_MemviewEnum);
4167 : Py_CLEAR(clear_module_state->__pyx_memoryview_type);
4168 : Py_CLEAR(clear_module_state->__pyx_type___pyx_memoryview);
4169 : Py_CLEAR(clear_module_state->__pyx_memoryviewslice_type);
4170 : Py_CLEAR(clear_module_state->__pyx_type___pyx_memoryviewslice);
4171 : Py_CLEAR(clear_module_state->__pyx_kp_u_);
4172 : Py_CLEAR(clear_module_state->__pyx_n_s_ASCII);
4173 : Py_CLEAR(clear_module_state->__pyx_kp_s_All_dimensions_preceding_dimensi);
4174 : Py_CLEAR(clear_module_state->__pyx_n_s_AssertionError);
4175 : Py_CLEAR(clear_module_state->__pyx_kp_s_Buffer_view_does_not_expose_stri);
4176 : Py_CLEAR(clear_module_state->__pyx_kp_s_Can_only_create_a_buffer_that_is);
4177 : Py_CLEAR(clear_module_state->__pyx_kp_s_Cannot_assign_to_read_only_memor);
4178 : Py_CLEAR(clear_module_state->__pyx_kp_s_Cannot_create_writable_memory_vi);
4179 : Py_CLEAR(clear_module_state->__pyx_kp_u_Cannot_index_with_type);
4180 : Py_CLEAR(clear_module_state->__pyx_kp_s_Cannot_transpose_memoryview_with);
4181 : Py_CLEAR(clear_module_state->__pyx_kp_s_Dimension_d_is_not_direct);
4182 : Py_CLEAR(clear_module_state->__pyx_n_s_Ellipsis);
4183 : Py_CLEAR(clear_module_state->__pyx_kp_s_Empty_shape_tuple_for_cython_arr);
4184 : Py_CLEAR(clear_module_state->__pyx_kp_s_Expected_at_least_d_argument_s_g);
4185 : Py_CLEAR(clear_module_state->__pyx_kp_s_Function_call_with_ambiguous_arg);
4186 : Py_CLEAR(clear_module_state->__pyx_n_s_ImportError);
4187 : Py_CLEAR(clear_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0);
4188 : Py_CLEAR(clear_module_state->__pyx_n_s_IndexError);
4189 : Py_CLEAR(clear_module_state->__pyx_kp_s_Index_out_of_bounds_axis_d);
4190 : Py_CLEAR(clear_module_state->__pyx_kp_s_Indirect_dimensions_not_supporte);
4191 : Py_CLEAR(clear_module_state->__pyx_kp_u_Invalid_mode_expected_c_or_fortr);
4192 : Py_CLEAR(clear_module_state->__pyx_kp_u_Invalid_shape_in_axis);
4193 : Py_CLEAR(clear_module_state->__pyx_n_s_MAXDEG);
4194 : Py_CLEAR(clear_module_state->__pyx_n_s_MAXDIM);
4195 : Py_CLEAR(clear_module_state->__pyx_n_s_MemoryError);
4196 : Py_CLEAR(clear_module_state->__pyx_kp_s_MemoryView_of_r_at_0x_x);
4197 : Py_CLEAR(clear_module_state->__pyx_kp_s_MemoryView_of_r_object);
4198 : Py_CLEAR(clear_module_state->__pyx_kp_s_No_matching_signature_found);
4199 : Py_CLEAR(clear_module_state->__pyx_n_b_O);
4200 : Py_CLEAR(clear_module_state->__pyx_kp_u_Out_of_bounds_on_buffer_access_a);
4201 : Py_CLEAR(clear_module_state->__pyx_n_s_PickleError);
4202 : Py_CLEAR(clear_module_state->__pyx_n_s_Sequence);
4203 : Py_CLEAR(clear_module_state->__pyx_kp_s_Step_may_not_be_zero_axis_d);
4204 : Py_CLEAR(clear_module_state->__pyx_n_s_TypeError);
4205 : Py_CLEAR(clear_module_state->__pyx_kp_s_Unable_to_convert_item_to_object);
4206 : Py_CLEAR(clear_module_state->__pyx_n_s_ValueError);
4207 : Py_CLEAR(clear_module_state->__pyx_n_s_View_MemoryView);
4208 : Py_CLEAR(clear_module_state->__pyx_kp_s__16);
4209 : Py_CLEAR(clear_module_state->__pyx_kp_s__17);
4210 : Py_CLEAR(clear_module_state->__pyx_kp_u__17);
4211 : Py_CLEAR(clear_module_state->__pyx_kp_u__2);
4212 : Py_CLEAR(clear_module_state->__pyx_n_s__3);
4213 : Py_CLEAR(clear_module_state->__pyx_n_s__56);
4214 : Py_CLEAR(clear_module_state->__pyx_kp_u__6);
4215 : Py_CLEAR(clear_module_state->__pyx_kp_u__7);
4216 : Py_CLEAR(clear_module_state->__pyx_n_s_abc);
4217 : Py_CLEAR(clear_module_state->__pyx_n_s_allocate_buffer);
4218 : Py_CLEAR(clear_module_state->__pyx_kp_u_and);
4219 : Py_CLEAR(clear_module_state->__pyx_n_s_args);
4220 : Py_CLEAR(clear_module_state->__pyx_n_s_as_file);
4221 : Py_CLEAR(clear_module_state->__pyx_n_s_astype);
4222 : Py_CLEAR(clear_module_state->__pyx_n_s_asyncio_coroutines);
4223 : Py_CLEAR(clear_module_state->__pyx_n_s_base);
4224 : Py_CLEAR(clear_module_state->__pyx_n_s_bits);
4225 : Py_CLEAR(clear_module_state->__pyx_n_s_c);
4226 : Py_CLEAR(clear_module_state->__pyx_n_u_c);
4227 : Py_CLEAR(clear_module_state->__pyx_n_s_categorize);
4228 : Py_CLEAR(clear_module_state->__pyx_n_s_class);
4229 : Py_CLEAR(clear_module_state->__pyx_n_s_class_getitem);
4230 : Py_CLEAR(clear_module_state->__pyx_n_s_cline_in_traceback);
4231 : Py_CLEAR(clear_module_state->__pyx_n_s_collections);
4232 : Py_CLEAR(clear_module_state->__pyx_kp_s_collections_abc);
4233 : Py_CLEAR(clear_module_state->__pyx_kp_s_contiguous_and_direct);
4234 : Py_CLEAR(clear_module_state->__pyx_kp_s_contiguous_and_indirect);
4235 : Py_CLEAR(clear_module_state->__pyx_n_s_count);
4236 : Py_CLEAR(clear_module_state->__pyx_n_s_cscramble);
4237 : Py_CLEAR(clear_module_state->__pyx_n_s_curdir);
4238 : Py_CLEAR(clear_module_state->__pyx_n_s_defaults);
4239 : Py_CLEAR(clear_module_state->__pyx_n_s_dict);
4240 : Py_CLEAR(clear_module_state->__pyx_n_s_dim);
4241 : Py_CLEAR(clear_module_state->__pyx_kp_u_disable);
4242 : Py_CLEAR(clear_module_state->__pyx_n_s_dns);
4243 : Py_CLEAR(clear_module_state->__pyx_n_s_dns_poly);
4244 : Py_CLEAR(clear_module_state->__pyx_n_s_dns_vinit);
4245 : Py_CLEAR(clear_module_state->__pyx_n_s_draw);
4246 : Py_CLEAR(clear_module_state->__pyx_n_s_draws);
4247 : Py_CLEAR(clear_module_state->__pyx_n_s_dtype);
4248 : Py_CLEAR(clear_module_state->__pyx_n_s_dtype_is_object);
4249 : Py_CLEAR(clear_module_state->__pyx_n_s_empty);
4250 : Py_CLEAR(clear_module_state->__pyx_kp_u_enable);
4251 : Py_CLEAR(clear_module_state->__pyx_n_s_encode);
4252 : Py_CLEAR(clear_module_state->__pyx_n_s_enter);
4253 : Py_CLEAR(clear_module_state->__pyx_n_s_enumerate);
4254 : Py_CLEAR(clear_module_state->__pyx_n_s_error);
4255 : Py_CLEAR(clear_module_state->__pyx_n_s_exit);
4256 : Py_CLEAR(clear_module_state->__pyx_n_s_f);
4257 : Py_CLEAR(clear_module_state->__pyx_n_s_fast_forward);
4258 : Py_CLEAR(clear_module_state->__pyx_n_s_files);
4259 : Py_CLEAR(clear_module_state->__pyx_n_s_fill_p_cumulative);
4260 : Py_CLEAR(clear_module_state->__pyx_n_s_flags);
4261 : Py_CLEAR(clear_module_state->__pyx_n_s_format);
4262 : Py_CLEAR(clear_module_state->__pyx_n_s_fortran);
4263 : Py_CLEAR(clear_module_state->__pyx_n_u_fortran);
4264 : Py_CLEAR(clear_module_state->__pyx_n_s_fused_sigindex);
4265 : Py_CLEAR(clear_module_state->__pyx_kp_u_gc);
4266 : Py_CLEAR(clear_module_state->__pyx_n_s_get);
4267 : Py_CLEAR(clear_module_state->__pyx_n_s_get_poly_vinit);
4268 : Py_CLEAR(clear_module_state->__pyx_n_s_getstate);
4269 : Py_CLEAR(clear_module_state->__pyx_kp_u_got);
4270 : Py_CLEAR(clear_module_state->__pyx_kp_u_got_differing_extents_in_dimensi);
4271 : Py_CLEAR(clear_module_state->__pyx_kp_s_home_czgdp18079_Quansight_scipy);
4272 : Py_CLEAR(clear_module_state->__pyx_n_s_id);
4273 : Py_CLEAR(clear_module_state->__pyx_n_s_import);
4274 : Py_CLEAR(clear_module_state->__pyx_n_s_importlib);
4275 : Py_CLEAR(clear_module_state->__pyx_n_s_importlib_resources);
4276 : Py_CLEAR(clear_module_state->__pyx_n_s_index);
4277 : Py_CLEAR(clear_module_state->__pyx_n_s_initialize_direction_numbers);
4278 : Py_CLEAR(clear_module_state->__pyx_n_s_initialize_v);
4279 : Py_CLEAR(clear_module_state->__pyx_n_s_initializing);
4280 : Py_CLEAR(clear_module_state->__pyx_n_s_is_coroutine);
4281 : Py_CLEAR(clear_module_state->__pyx_kp_u_isenabled);
4282 : Py_CLEAR(clear_module_state->__pyx_n_s_itemsize);
4283 : Py_CLEAR(clear_module_state->__pyx_kp_s_itemsize_0_for_cython_array);
4284 : Py_CLEAR(clear_module_state->__pyx_n_s_joinpath);
4285 : Py_CLEAR(clear_module_state->__pyx_n_s_kind);
4286 : Py_CLEAR(clear_module_state->__pyx_n_s_kwargs);
4287 : Py_CLEAR(clear_module_state->__pyx_n_s_load);
4288 : Py_CLEAR(clear_module_state->__pyx_n_s_ltm);
4289 : Py_CLEAR(clear_module_state->__pyx_n_s_main);
4290 : Py_CLEAR(clear_module_state->__pyx_n_s_memview);
4291 : Py_CLEAR(clear_module_state->__pyx_n_s_mode);
4292 : Py_CLEAR(clear_module_state->__pyx_n_s_n);
4293 : Py_CLEAR(clear_module_state->__pyx_n_s_n_2);
4294 : Py_CLEAR(clear_module_state->__pyx_n_s_name);
4295 : Py_CLEAR(clear_module_state->__pyx_n_s_name_2);
4296 : Py_CLEAR(clear_module_state->__pyx_n_s_ndim);
4297 : Py_CLEAR(clear_module_state->__pyx_n_s_new);
4298 : Py_CLEAR(clear_module_state->__pyx_kp_s_no_default___reduce___due_to_non);
4299 : Py_CLEAR(clear_module_state->__pyx_n_s_np);
4300 : Py_CLEAR(clear_module_state->__pyx_n_s_npzfile);
4301 : Py_CLEAR(clear_module_state->__pyx_n_s_num_gen);
4302 : Py_CLEAR(clear_module_state->__pyx_n_s_num_gen_2);
4303 : Py_CLEAR(clear_module_state->__pyx_n_s_numpy);
4304 : Py_CLEAR(clear_module_state->__pyx_kp_u_numpy__core_multiarray_failed_to);
4305 : Py_CLEAR(clear_module_state->__pyx_kp_u_numpy__core_umath_failed_to_impo);
4306 : Py_CLEAR(clear_module_state->__pyx_n_s_obj);
4307 : Py_CLEAR(clear_module_state->__pyx_n_s_p);
4308 : Py_CLEAR(clear_module_state->__pyx_n_s_p_cumulative);
4309 : Py_CLEAR(clear_module_state->__pyx_n_s_pack);
4310 : Py_CLEAR(clear_module_state->__pyx_n_s_pickle);
4311 : Py_CLEAR(clear_module_state->__pyx_n_s_poly);
4312 : Py_CLEAR(clear_module_state->__pyx_n_u_poly);
4313 : Py_CLEAR(clear_module_state->__pyx_n_s_poly_dict);
4314 : Py_CLEAR(clear_module_state->__pyx_n_s_poly_vinit);
4315 : Py_CLEAR(clear_module_state->__pyx_n_s_pyx_PickleError);
4316 : Py_CLEAR(clear_module_state->__pyx_n_s_pyx_checksum);
4317 : Py_CLEAR(clear_module_state->__pyx_n_s_pyx_fuse_0_cscramble);
4318 : Py_CLEAR(clear_module_state->__pyx_n_s_pyx_fuse_0_fast_forward);
4319 : Py_CLEAR(clear_module_state->__pyx_n_s_pyx_fuse_0_initialize_v);
4320 : Py_CLEAR(clear_module_state->__pyx_n_s_pyx_fuse_1_cscramble);
4321 : Py_CLEAR(clear_module_state->__pyx_n_s_pyx_fuse_1_fast_forward);
4322 : Py_CLEAR(clear_module_state->__pyx_n_s_pyx_fuse_1_initialize_v);
4323 : Py_CLEAR(clear_module_state->__pyx_n_s_pyx_result);
4324 : Py_CLEAR(clear_module_state->__pyx_n_s_pyx_state);
4325 : Py_CLEAR(clear_module_state->__pyx_n_s_pyx_type);
4326 : Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_Enum);
4327 : Py_CLEAR(clear_module_state->__pyx_n_s_pyx_vtable);
4328 : Py_CLEAR(clear_module_state->__pyx_n_s_quasi);
4329 : Py_CLEAR(clear_module_state->__pyx_n_s_range);
4330 : Py_CLEAR(clear_module_state->__pyx_n_s_reduce);
4331 : Py_CLEAR(clear_module_state->__pyx_n_s_reduce_cython);
4332 : Py_CLEAR(clear_module_state->__pyx_n_s_reduce_ex);
4333 : Py_CLEAR(clear_module_state->__pyx_n_s_register);
4334 : Py_CLEAR(clear_module_state->__pyx_n_s_resources);
4335 : Py_CLEAR(clear_module_state->__pyx_n_s_result);
4336 : Py_CLEAR(clear_module_state->__pyx_n_s_s);
4337 : Py_CLEAR(clear_module_state->__pyx_n_s_sample);
4338 : Py_CLEAR(clear_module_state->__pyx_n_s_scale);
4339 : Py_CLEAR(clear_module_state->__pyx_kp_u_scipy_stats);
4340 : Py_CLEAR(clear_module_state->__pyx_n_s_scipy_stats__sobol);
4341 : Py_CLEAR(clear_module_state->__pyx_n_s_setstate);
4342 : Py_CLEAR(clear_module_state->__pyx_n_s_setstate_cython);
4343 : Py_CLEAR(clear_module_state->__pyx_n_s_shape);
4344 : Py_CLEAR(clear_module_state->__pyx_n_s_signatures);
4345 : Py_CLEAR(clear_module_state->__pyx_n_s_size);
4346 : Py_CLEAR(clear_module_state->__pyx_kp_u_sobol_direction_numbers_npz);
4347 : Py_CLEAR(clear_module_state->__pyx_n_s_spec);
4348 : Py_CLEAR(clear_module_state->__pyx_n_s_split);
4349 : Py_CLEAR(clear_module_state->__pyx_n_s_start);
4350 : Py_CLEAR(clear_module_state->__pyx_n_s_step);
4351 : Py_CLEAR(clear_module_state->__pyx_n_s_stop);
4352 : Py_CLEAR(clear_module_state->__pyx_kp_s_strided_and_direct);
4353 : Py_CLEAR(clear_module_state->__pyx_kp_s_strided_and_direct_or_indirect);
4354 : Py_CLEAR(clear_module_state->__pyx_kp_s_strided_and_indirect);
4355 : Py_CLEAR(clear_module_state->__pyx_kp_s_stringsource);
4356 : Py_CLEAR(clear_module_state->__pyx_n_s_strip);
4357 : Py_CLEAR(clear_module_state->__pyx_n_s_struct);
4358 : Py_CLEAR(clear_module_state->__pyx_n_s_sv);
4359 : Py_CLEAR(clear_module_state->__pyx_n_s_sys);
4360 : Py_CLEAR(clear_module_state->__pyx_n_s_test);
4361 : Py_CLEAR(clear_module_state->__pyx_n_s_test_find_index);
4362 : Py_CLEAR(clear_module_state->__pyx_n_s_uint32);
4363 : Py_CLEAR(clear_module_state->__pyx_n_s_uint32_t);
4364 : Py_CLEAR(clear_module_state->__pyx_n_s_uint64);
4365 : Py_CLEAR(clear_module_state->__pyx_n_s_uint64_t);
4366 : Py_CLEAR(clear_module_state->__pyx_kp_s_unable_to_allocate_array_data);
4367 : Py_CLEAR(clear_module_state->__pyx_kp_s_unable_to_allocate_shape_and_str);
4368 : Py_CLEAR(clear_module_state->__pyx_n_s_unpack);
4369 : Py_CLEAR(clear_module_state->__pyx_n_s_update);
4370 : Py_CLEAR(clear_module_state->__pyx_n_s_v);
4371 : Py_CLEAR(clear_module_state->__pyx_n_s_value);
4372 : Py_CLEAR(clear_module_state->__pyx_n_s_values);
4373 : Py_CLEAR(clear_module_state->__pyx_n_s_version_info);
4374 : Py_CLEAR(clear_module_state->__pyx_n_s_vinit);
4375 : Py_CLEAR(clear_module_state->__pyx_n_u_vinit);
4376 : Py_CLEAR(clear_module_state->__pyx_n_s_vinit_dict);
4377 : Py_CLEAR(clear_module_state->__pyx_int_0);
4378 : Py_CLEAR(clear_module_state->__pyx_int_1);
4379 : Py_CLEAR(clear_module_state->__pyx_int_3);
4380 : Py_CLEAR(clear_module_state->__pyx_int_4);
4381 : Py_CLEAR(clear_module_state->__pyx_int_5);
4382 : Py_CLEAR(clear_module_state->__pyx_int_7);
4383 : Py_CLEAR(clear_module_state->__pyx_int_18);
4384 : Py_CLEAR(clear_module_state->__pyx_int_21201);
4385 : Py_CLEAR(clear_module_state->__pyx_int_112105877);
4386 : Py_CLEAR(clear_module_state->__pyx_int_136983863);
4387 : Py_CLEAR(clear_module_state->__pyx_int_184977713);
4388 : Py_CLEAR(clear_module_state->__pyx_int_neg_1);
4389 : Py_CLEAR(clear_module_state->__pyx_slice__5);
4390 : Py_CLEAR(clear_module_state->__pyx_tuple__4);
4391 : Py_CLEAR(clear_module_state->__pyx_tuple__8);
4392 : Py_CLEAR(clear_module_state->__pyx_tuple__9);
4393 : Py_CLEAR(clear_module_state->__pyx_tuple__10);
4394 : Py_CLEAR(clear_module_state->__pyx_tuple__11);
4395 : Py_CLEAR(clear_module_state->__pyx_tuple__12);
4396 : Py_CLEAR(clear_module_state->__pyx_tuple__13);
4397 : Py_CLEAR(clear_module_state->__pyx_tuple__14);
4398 : Py_CLEAR(clear_module_state->__pyx_tuple__15);
4399 : Py_CLEAR(clear_module_state->__pyx_tuple__18);
4400 : Py_CLEAR(clear_module_state->__pyx_tuple__19);
4401 : Py_CLEAR(clear_module_state->__pyx_tuple__20);
4402 : Py_CLEAR(clear_module_state->__pyx_tuple__21);
4403 : Py_CLEAR(clear_module_state->__pyx_tuple__22);
4404 : Py_CLEAR(clear_module_state->__pyx_tuple__23);
4405 : Py_CLEAR(clear_module_state->__pyx_tuple__24);
4406 : Py_CLEAR(clear_module_state->__pyx_tuple__25);
4407 : Py_CLEAR(clear_module_state->__pyx_tuple__26);
4408 : Py_CLEAR(clear_module_state->__pyx_tuple__27);
4409 : Py_CLEAR(clear_module_state->__pyx_tuple__28);
4410 : Py_CLEAR(clear_module_state->__pyx_tuple__29);
4411 : Py_CLEAR(clear_module_state->__pyx_tuple__31);
4412 : Py_CLEAR(clear_module_state->__pyx_tuple__32);
4413 : Py_CLEAR(clear_module_state->__pyx_tuple__34);
4414 : Py_CLEAR(clear_module_state->__pyx_tuple__36);
4415 : Py_CLEAR(clear_module_state->__pyx_tuple__40);
4416 : Py_CLEAR(clear_module_state->__pyx_tuple__42);
4417 : Py_CLEAR(clear_module_state->__pyx_tuple__46);
4418 : Py_CLEAR(clear_module_state->__pyx_tuple__50);
4419 : Py_CLEAR(clear_module_state->__pyx_tuple__52);
4420 : Py_CLEAR(clear_module_state->__pyx_tuple__54);
4421 : Py_CLEAR(clear_module_state->__pyx_codeobj__30);
4422 : Py_CLEAR(clear_module_state->__pyx_codeobj__33);
4423 : Py_CLEAR(clear_module_state->__pyx_codeobj__35);
4424 : Py_CLEAR(clear_module_state->__pyx_codeobj__37);
4425 : Py_CLEAR(clear_module_state->__pyx_codeobj__38);
4426 : Py_CLEAR(clear_module_state->__pyx_codeobj__39);
4427 : Py_CLEAR(clear_module_state->__pyx_codeobj__41);
4428 : Py_CLEAR(clear_module_state->__pyx_codeobj__43);
4429 : Py_CLEAR(clear_module_state->__pyx_codeobj__44);
4430 : Py_CLEAR(clear_module_state->__pyx_codeobj__45);
4431 : Py_CLEAR(clear_module_state->__pyx_codeobj__47);
4432 : Py_CLEAR(clear_module_state->__pyx_codeobj__48);
4433 : Py_CLEAR(clear_module_state->__pyx_codeobj__49);
4434 : Py_CLEAR(clear_module_state->__pyx_codeobj__51);
4435 : Py_CLEAR(clear_module_state->__pyx_codeobj__53);
4436 : Py_CLEAR(clear_module_state->__pyx_codeobj__55);
4437 : return 0;
4438 : }
4439 : #endif
4440 : /* #### Code section: module_state_traverse ### */
4441 : #if CYTHON_USE_MODULE_STATE
4442 : static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
4443 : __pyx_mstate *traverse_module_state = __pyx_mstate(m);
4444 : if (!traverse_module_state) return 0;
4445 : Py_VISIT(traverse_module_state->__pyx_d);
4446 : Py_VISIT(traverse_module_state->__pyx_b);
4447 : Py_VISIT(traverse_module_state->__pyx_cython_runtime);
4448 : Py_VISIT(traverse_module_state->__pyx_empty_tuple);
4449 : Py_VISIT(traverse_module_state->__pyx_empty_bytes);
4450 : Py_VISIT(traverse_module_state->__pyx_empty_unicode);
4451 : #ifdef __Pyx_CyFunction_USED
4452 : Py_VISIT(traverse_module_state->__pyx_CyFunctionType);
4453 : #endif
4454 : #ifdef __Pyx_FusedFunction_USED
4455 : Py_VISIT(traverse_module_state->__pyx_FusedFunctionType);
4456 : #endif
4457 : Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4type_type);
4458 : Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_dtype);
4459 : Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_flatiter);
4460 : Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_broadcast);
4461 : Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_ndarray);
4462 : Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_generic);
4463 : Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_number);
4464 : Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_integer);
4465 : Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_signedinteger);
4466 : Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_unsignedinteger);
4467 : Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_inexact);
4468 : Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_floating);
4469 : Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_complexfloating);
4470 : Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_flexible);
4471 : Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_character);
4472 : Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_ufunc);
4473 : Py_VISIT(traverse_module_state->__pyx_array_type);
4474 : Py_VISIT(traverse_module_state->__pyx_type___pyx_array);
4475 : Py_VISIT(traverse_module_state->__pyx_MemviewEnum_type);
4476 : Py_VISIT(traverse_module_state->__pyx_type___pyx_MemviewEnum);
4477 : Py_VISIT(traverse_module_state->__pyx_memoryview_type);
4478 : Py_VISIT(traverse_module_state->__pyx_type___pyx_memoryview);
4479 : Py_VISIT(traverse_module_state->__pyx_memoryviewslice_type);
4480 : Py_VISIT(traverse_module_state->__pyx_type___pyx_memoryviewslice);
4481 : Py_VISIT(traverse_module_state->__pyx_kp_u_);
4482 : Py_VISIT(traverse_module_state->__pyx_n_s_ASCII);
4483 : Py_VISIT(traverse_module_state->__pyx_kp_s_All_dimensions_preceding_dimensi);
4484 : Py_VISIT(traverse_module_state->__pyx_n_s_AssertionError);
4485 : Py_VISIT(traverse_module_state->__pyx_kp_s_Buffer_view_does_not_expose_stri);
4486 : Py_VISIT(traverse_module_state->__pyx_kp_s_Can_only_create_a_buffer_that_is);
4487 : Py_VISIT(traverse_module_state->__pyx_kp_s_Cannot_assign_to_read_only_memor);
4488 : Py_VISIT(traverse_module_state->__pyx_kp_s_Cannot_create_writable_memory_vi);
4489 : Py_VISIT(traverse_module_state->__pyx_kp_u_Cannot_index_with_type);
4490 : Py_VISIT(traverse_module_state->__pyx_kp_s_Cannot_transpose_memoryview_with);
4491 : Py_VISIT(traverse_module_state->__pyx_kp_s_Dimension_d_is_not_direct);
4492 : Py_VISIT(traverse_module_state->__pyx_n_s_Ellipsis);
4493 : Py_VISIT(traverse_module_state->__pyx_kp_s_Empty_shape_tuple_for_cython_arr);
4494 : Py_VISIT(traverse_module_state->__pyx_kp_s_Expected_at_least_d_argument_s_g);
4495 : Py_VISIT(traverse_module_state->__pyx_kp_s_Function_call_with_ambiguous_arg);
4496 : Py_VISIT(traverse_module_state->__pyx_n_s_ImportError);
4497 : Py_VISIT(traverse_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0);
4498 : Py_VISIT(traverse_module_state->__pyx_n_s_IndexError);
4499 : Py_VISIT(traverse_module_state->__pyx_kp_s_Index_out_of_bounds_axis_d);
4500 : Py_VISIT(traverse_module_state->__pyx_kp_s_Indirect_dimensions_not_supporte);
4501 : Py_VISIT(traverse_module_state->__pyx_kp_u_Invalid_mode_expected_c_or_fortr);
4502 : Py_VISIT(traverse_module_state->__pyx_kp_u_Invalid_shape_in_axis);
4503 : Py_VISIT(traverse_module_state->__pyx_n_s_MAXDEG);
4504 : Py_VISIT(traverse_module_state->__pyx_n_s_MAXDIM);
4505 : Py_VISIT(traverse_module_state->__pyx_n_s_MemoryError);
4506 : Py_VISIT(traverse_module_state->__pyx_kp_s_MemoryView_of_r_at_0x_x);
4507 : Py_VISIT(traverse_module_state->__pyx_kp_s_MemoryView_of_r_object);
4508 : Py_VISIT(traverse_module_state->__pyx_kp_s_No_matching_signature_found);
4509 : Py_VISIT(traverse_module_state->__pyx_n_b_O);
4510 : Py_VISIT(traverse_module_state->__pyx_kp_u_Out_of_bounds_on_buffer_access_a);
4511 : Py_VISIT(traverse_module_state->__pyx_n_s_PickleError);
4512 : Py_VISIT(traverse_module_state->__pyx_n_s_Sequence);
4513 : Py_VISIT(traverse_module_state->__pyx_kp_s_Step_may_not_be_zero_axis_d);
4514 : Py_VISIT(traverse_module_state->__pyx_n_s_TypeError);
4515 : Py_VISIT(traverse_module_state->__pyx_kp_s_Unable_to_convert_item_to_object);
4516 : Py_VISIT(traverse_module_state->__pyx_n_s_ValueError);
4517 : Py_VISIT(traverse_module_state->__pyx_n_s_View_MemoryView);
4518 : Py_VISIT(traverse_module_state->__pyx_kp_s__16);
4519 : Py_VISIT(traverse_module_state->__pyx_kp_s__17);
4520 : Py_VISIT(traverse_module_state->__pyx_kp_u__17);
4521 : Py_VISIT(traverse_module_state->__pyx_kp_u__2);
4522 : Py_VISIT(traverse_module_state->__pyx_n_s__3);
4523 : Py_VISIT(traverse_module_state->__pyx_n_s__56);
4524 : Py_VISIT(traverse_module_state->__pyx_kp_u__6);
4525 : Py_VISIT(traverse_module_state->__pyx_kp_u__7);
4526 : Py_VISIT(traverse_module_state->__pyx_n_s_abc);
4527 : Py_VISIT(traverse_module_state->__pyx_n_s_allocate_buffer);
4528 : Py_VISIT(traverse_module_state->__pyx_kp_u_and);
4529 : Py_VISIT(traverse_module_state->__pyx_n_s_args);
4530 : Py_VISIT(traverse_module_state->__pyx_n_s_as_file);
4531 : Py_VISIT(traverse_module_state->__pyx_n_s_astype);
4532 : Py_VISIT(traverse_module_state->__pyx_n_s_asyncio_coroutines);
4533 : Py_VISIT(traverse_module_state->__pyx_n_s_base);
4534 : Py_VISIT(traverse_module_state->__pyx_n_s_bits);
4535 : Py_VISIT(traverse_module_state->__pyx_n_s_c);
4536 : Py_VISIT(traverse_module_state->__pyx_n_u_c);
4537 : Py_VISIT(traverse_module_state->__pyx_n_s_categorize);
4538 : Py_VISIT(traverse_module_state->__pyx_n_s_class);
4539 : Py_VISIT(traverse_module_state->__pyx_n_s_class_getitem);
4540 : Py_VISIT(traverse_module_state->__pyx_n_s_cline_in_traceback);
4541 : Py_VISIT(traverse_module_state->__pyx_n_s_collections);
4542 : Py_VISIT(traverse_module_state->__pyx_kp_s_collections_abc);
4543 : Py_VISIT(traverse_module_state->__pyx_kp_s_contiguous_and_direct);
4544 : Py_VISIT(traverse_module_state->__pyx_kp_s_contiguous_and_indirect);
4545 : Py_VISIT(traverse_module_state->__pyx_n_s_count);
4546 : Py_VISIT(traverse_module_state->__pyx_n_s_cscramble);
4547 : Py_VISIT(traverse_module_state->__pyx_n_s_curdir);
4548 : Py_VISIT(traverse_module_state->__pyx_n_s_defaults);
4549 : Py_VISIT(traverse_module_state->__pyx_n_s_dict);
4550 : Py_VISIT(traverse_module_state->__pyx_n_s_dim);
4551 : Py_VISIT(traverse_module_state->__pyx_kp_u_disable);
4552 : Py_VISIT(traverse_module_state->__pyx_n_s_dns);
4553 : Py_VISIT(traverse_module_state->__pyx_n_s_dns_poly);
4554 : Py_VISIT(traverse_module_state->__pyx_n_s_dns_vinit);
4555 : Py_VISIT(traverse_module_state->__pyx_n_s_draw);
4556 : Py_VISIT(traverse_module_state->__pyx_n_s_draws);
4557 : Py_VISIT(traverse_module_state->__pyx_n_s_dtype);
4558 : Py_VISIT(traverse_module_state->__pyx_n_s_dtype_is_object);
4559 : Py_VISIT(traverse_module_state->__pyx_n_s_empty);
4560 : Py_VISIT(traverse_module_state->__pyx_kp_u_enable);
4561 : Py_VISIT(traverse_module_state->__pyx_n_s_encode);
4562 : Py_VISIT(traverse_module_state->__pyx_n_s_enter);
4563 : Py_VISIT(traverse_module_state->__pyx_n_s_enumerate);
4564 : Py_VISIT(traverse_module_state->__pyx_n_s_error);
4565 : Py_VISIT(traverse_module_state->__pyx_n_s_exit);
4566 : Py_VISIT(traverse_module_state->__pyx_n_s_f);
4567 : Py_VISIT(traverse_module_state->__pyx_n_s_fast_forward);
4568 : Py_VISIT(traverse_module_state->__pyx_n_s_files);
4569 : Py_VISIT(traverse_module_state->__pyx_n_s_fill_p_cumulative);
4570 : Py_VISIT(traverse_module_state->__pyx_n_s_flags);
4571 : Py_VISIT(traverse_module_state->__pyx_n_s_format);
4572 : Py_VISIT(traverse_module_state->__pyx_n_s_fortran);
4573 : Py_VISIT(traverse_module_state->__pyx_n_u_fortran);
4574 : Py_VISIT(traverse_module_state->__pyx_n_s_fused_sigindex);
4575 : Py_VISIT(traverse_module_state->__pyx_kp_u_gc);
4576 : Py_VISIT(traverse_module_state->__pyx_n_s_get);
4577 : Py_VISIT(traverse_module_state->__pyx_n_s_get_poly_vinit);
4578 : Py_VISIT(traverse_module_state->__pyx_n_s_getstate);
4579 : Py_VISIT(traverse_module_state->__pyx_kp_u_got);
4580 : Py_VISIT(traverse_module_state->__pyx_kp_u_got_differing_extents_in_dimensi);
4581 : Py_VISIT(traverse_module_state->__pyx_kp_s_home_czgdp18079_Quansight_scipy);
4582 : Py_VISIT(traverse_module_state->__pyx_n_s_id);
4583 : Py_VISIT(traverse_module_state->__pyx_n_s_import);
4584 : Py_VISIT(traverse_module_state->__pyx_n_s_importlib);
4585 : Py_VISIT(traverse_module_state->__pyx_n_s_importlib_resources);
4586 : Py_VISIT(traverse_module_state->__pyx_n_s_index);
4587 : Py_VISIT(traverse_module_state->__pyx_n_s_initialize_direction_numbers);
4588 : Py_VISIT(traverse_module_state->__pyx_n_s_initialize_v);
4589 : Py_VISIT(traverse_module_state->__pyx_n_s_initializing);
4590 : Py_VISIT(traverse_module_state->__pyx_n_s_is_coroutine);
4591 : Py_VISIT(traverse_module_state->__pyx_kp_u_isenabled);
4592 : Py_VISIT(traverse_module_state->__pyx_n_s_itemsize);
4593 : Py_VISIT(traverse_module_state->__pyx_kp_s_itemsize_0_for_cython_array);
4594 : Py_VISIT(traverse_module_state->__pyx_n_s_joinpath);
4595 : Py_VISIT(traverse_module_state->__pyx_n_s_kind);
4596 : Py_VISIT(traverse_module_state->__pyx_n_s_kwargs);
4597 : Py_VISIT(traverse_module_state->__pyx_n_s_load);
4598 : Py_VISIT(traverse_module_state->__pyx_n_s_ltm);
4599 : Py_VISIT(traverse_module_state->__pyx_n_s_main);
4600 : Py_VISIT(traverse_module_state->__pyx_n_s_memview);
4601 : Py_VISIT(traverse_module_state->__pyx_n_s_mode);
4602 : Py_VISIT(traverse_module_state->__pyx_n_s_n);
4603 : Py_VISIT(traverse_module_state->__pyx_n_s_n_2);
4604 : Py_VISIT(traverse_module_state->__pyx_n_s_name);
4605 : Py_VISIT(traverse_module_state->__pyx_n_s_name_2);
4606 : Py_VISIT(traverse_module_state->__pyx_n_s_ndim);
4607 : Py_VISIT(traverse_module_state->__pyx_n_s_new);
4608 : Py_VISIT(traverse_module_state->__pyx_kp_s_no_default___reduce___due_to_non);
4609 : Py_VISIT(traverse_module_state->__pyx_n_s_np);
4610 : Py_VISIT(traverse_module_state->__pyx_n_s_npzfile);
4611 : Py_VISIT(traverse_module_state->__pyx_n_s_num_gen);
4612 : Py_VISIT(traverse_module_state->__pyx_n_s_num_gen_2);
4613 : Py_VISIT(traverse_module_state->__pyx_n_s_numpy);
4614 : Py_VISIT(traverse_module_state->__pyx_kp_u_numpy__core_multiarray_failed_to);
4615 : Py_VISIT(traverse_module_state->__pyx_kp_u_numpy__core_umath_failed_to_impo);
4616 : Py_VISIT(traverse_module_state->__pyx_n_s_obj);
4617 : Py_VISIT(traverse_module_state->__pyx_n_s_p);
4618 : Py_VISIT(traverse_module_state->__pyx_n_s_p_cumulative);
4619 : Py_VISIT(traverse_module_state->__pyx_n_s_pack);
4620 : Py_VISIT(traverse_module_state->__pyx_n_s_pickle);
4621 : Py_VISIT(traverse_module_state->__pyx_n_s_poly);
4622 : Py_VISIT(traverse_module_state->__pyx_n_u_poly);
4623 : Py_VISIT(traverse_module_state->__pyx_n_s_poly_dict);
4624 : Py_VISIT(traverse_module_state->__pyx_n_s_poly_vinit);
4625 : Py_VISIT(traverse_module_state->__pyx_n_s_pyx_PickleError);
4626 : Py_VISIT(traverse_module_state->__pyx_n_s_pyx_checksum);
4627 : Py_VISIT(traverse_module_state->__pyx_n_s_pyx_fuse_0_cscramble);
4628 : Py_VISIT(traverse_module_state->__pyx_n_s_pyx_fuse_0_fast_forward);
4629 : Py_VISIT(traverse_module_state->__pyx_n_s_pyx_fuse_0_initialize_v);
4630 : Py_VISIT(traverse_module_state->__pyx_n_s_pyx_fuse_1_cscramble);
4631 : Py_VISIT(traverse_module_state->__pyx_n_s_pyx_fuse_1_fast_forward);
4632 : Py_VISIT(traverse_module_state->__pyx_n_s_pyx_fuse_1_initialize_v);
4633 : Py_VISIT(traverse_module_state->__pyx_n_s_pyx_result);
4634 : Py_VISIT(traverse_module_state->__pyx_n_s_pyx_state);
4635 : Py_VISIT(traverse_module_state->__pyx_n_s_pyx_type);
4636 : Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_Enum);
4637 : Py_VISIT(traverse_module_state->__pyx_n_s_pyx_vtable);
4638 : Py_VISIT(traverse_module_state->__pyx_n_s_quasi);
4639 : Py_VISIT(traverse_module_state->__pyx_n_s_range);
4640 : Py_VISIT(traverse_module_state->__pyx_n_s_reduce);
4641 : Py_VISIT(traverse_module_state->__pyx_n_s_reduce_cython);
4642 : Py_VISIT(traverse_module_state->__pyx_n_s_reduce_ex);
4643 : Py_VISIT(traverse_module_state->__pyx_n_s_register);
4644 : Py_VISIT(traverse_module_state->__pyx_n_s_resources);
4645 : Py_VISIT(traverse_module_state->__pyx_n_s_result);
4646 : Py_VISIT(traverse_module_state->__pyx_n_s_s);
4647 : Py_VISIT(traverse_module_state->__pyx_n_s_sample);
4648 : Py_VISIT(traverse_module_state->__pyx_n_s_scale);
4649 : Py_VISIT(traverse_module_state->__pyx_kp_u_scipy_stats);
4650 : Py_VISIT(traverse_module_state->__pyx_n_s_scipy_stats__sobol);
4651 : Py_VISIT(traverse_module_state->__pyx_n_s_setstate);
4652 : Py_VISIT(traverse_module_state->__pyx_n_s_setstate_cython);
4653 : Py_VISIT(traverse_module_state->__pyx_n_s_shape);
4654 : Py_VISIT(traverse_module_state->__pyx_n_s_signatures);
4655 : Py_VISIT(traverse_module_state->__pyx_n_s_size);
4656 : Py_VISIT(traverse_module_state->__pyx_kp_u_sobol_direction_numbers_npz);
4657 : Py_VISIT(traverse_module_state->__pyx_n_s_spec);
4658 : Py_VISIT(traverse_module_state->__pyx_n_s_split);
4659 : Py_VISIT(traverse_module_state->__pyx_n_s_start);
4660 : Py_VISIT(traverse_module_state->__pyx_n_s_step);
4661 : Py_VISIT(traverse_module_state->__pyx_n_s_stop);
4662 : Py_VISIT(traverse_module_state->__pyx_kp_s_strided_and_direct);
4663 : Py_VISIT(traverse_module_state->__pyx_kp_s_strided_and_direct_or_indirect);
4664 : Py_VISIT(traverse_module_state->__pyx_kp_s_strided_and_indirect);
4665 : Py_VISIT(traverse_module_state->__pyx_kp_s_stringsource);
4666 : Py_VISIT(traverse_module_state->__pyx_n_s_strip);
4667 : Py_VISIT(traverse_module_state->__pyx_n_s_struct);
4668 : Py_VISIT(traverse_module_state->__pyx_n_s_sv);
4669 : Py_VISIT(traverse_module_state->__pyx_n_s_sys);
4670 : Py_VISIT(traverse_module_state->__pyx_n_s_test);
4671 : Py_VISIT(traverse_module_state->__pyx_n_s_test_find_index);
4672 : Py_VISIT(traverse_module_state->__pyx_n_s_uint32);
4673 : Py_VISIT(traverse_module_state->__pyx_n_s_uint32_t);
4674 : Py_VISIT(traverse_module_state->__pyx_n_s_uint64);
4675 : Py_VISIT(traverse_module_state->__pyx_n_s_uint64_t);
4676 : Py_VISIT(traverse_module_state->__pyx_kp_s_unable_to_allocate_array_data);
4677 : Py_VISIT(traverse_module_state->__pyx_kp_s_unable_to_allocate_shape_and_str);
4678 : Py_VISIT(traverse_module_state->__pyx_n_s_unpack);
4679 : Py_VISIT(traverse_module_state->__pyx_n_s_update);
4680 : Py_VISIT(traverse_module_state->__pyx_n_s_v);
4681 : Py_VISIT(traverse_module_state->__pyx_n_s_value);
4682 : Py_VISIT(traverse_module_state->__pyx_n_s_values);
4683 : Py_VISIT(traverse_module_state->__pyx_n_s_version_info);
4684 : Py_VISIT(traverse_module_state->__pyx_n_s_vinit);
4685 : Py_VISIT(traverse_module_state->__pyx_n_u_vinit);
4686 : Py_VISIT(traverse_module_state->__pyx_n_s_vinit_dict);
4687 : Py_VISIT(traverse_module_state->__pyx_int_0);
4688 : Py_VISIT(traverse_module_state->__pyx_int_1);
4689 : Py_VISIT(traverse_module_state->__pyx_int_3);
4690 : Py_VISIT(traverse_module_state->__pyx_int_4);
4691 : Py_VISIT(traverse_module_state->__pyx_int_5);
4692 : Py_VISIT(traverse_module_state->__pyx_int_7);
4693 : Py_VISIT(traverse_module_state->__pyx_int_18);
4694 : Py_VISIT(traverse_module_state->__pyx_int_21201);
4695 : Py_VISIT(traverse_module_state->__pyx_int_112105877);
4696 : Py_VISIT(traverse_module_state->__pyx_int_136983863);
4697 : Py_VISIT(traverse_module_state->__pyx_int_184977713);
4698 : Py_VISIT(traverse_module_state->__pyx_int_neg_1);
4699 : Py_VISIT(traverse_module_state->__pyx_slice__5);
4700 : Py_VISIT(traverse_module_state->__pyx_tuple__4);
4701 : Py_VISIT(traverse_module_state->__pyx_tuple__8);
4702 : Py_VISIT(traverse_module_state->__pyx_tuple__9);
4703 : Py_VISIT(traverse_module_state->__pyx_tuple__10);
4704 : Py_VISIT(traverse_module_state->__pyx_tuple__11);
4705 : Py_VISIT(traverse_module_state->__pyx_tuple__12);
4706 : Py_VISIT(traverse_module_state->__pyx_tuple__13);
4707 : Py_VISIT(traverse_module_state->__pyx_tuple__14);
4708 : Py_VISIT(traverse_module_state->__pyx_tuple__15);
4709 : Py_VISIT(traverse_module_state->__pyx_tuple__18);
4710 : Py_VISIT(traverse_module_state->__pyx_tuple__19);
4711 : Py_VISIT(traverse_module_state->__pyx_tuple__20);
4712 : Py_VISIT(traverse_module_state->__pyx_tuple__21);
4713 : Py_VISIT(traverse_module_state->__pyx_tuple__22);
4714 : Py_VISIT(traverse_module_state->__pyx_tuple__23);
4715 : Py_VISIT(traverse_module_state->__pyx_tuple__24);
4716 : Py_VISIT(traverse_module_state->__pyx_tuple__25);
4717 : Py_VISIT(traverse_module_state->__pyx_tuple__26);
4718 : Py_VISIT(traverse_module_state->__pyx_tuple__27);
4719 : Py_VISIT(traverse_module_state->__pyx_tuple__28);
4720 : Py_VISIT(traverse_module_state->__pyx_tuple__29);
4721 : Py_VISIT(traverse_module_state->__pyx_tuple__31);
4722 : Py_VISIT(traverse_module_state->__pyx_tuple__32);
4723 : Py_VISIT(traverse_module_state->__pyx_tuple__34);
4724 : Py_VISIT(traverse_module_state->__pyx_tuple__36);
4725 : Py_VISIT(traverse_module_state->__pyx_tuple__40);
4726 : Py_VISIT(traverse_module_state->__pyx_tuple__42);
4727 : Py_VISIT(traverse_module_state->__pyx_tuple__46);
4728 : Py_VISIT(traverse_module_state->__pyx_tuple__50);
4729 : Py_VISIT(traverse_module_state->__pyx_tuple__52);
4730 : Py_VISIT(traverse_module_state->__pyx_tuple__54);
4731 : Py_VISIT(traverse_module_state->__pyx_codeobj__30);
4732 : Py_VISIT(traverse_module_state->__pyx_codeobj__33);
4733 : Py_VISIT(traverse_module_state->__pyx_codeobj__35);
4734 : Py_VISIT(traverse_module_state->__pyx_codeobj__37);
4735 : Py_VISIT(traverse_module_state->__pyx_codeobj__38);
4736 : Py_VISIT(traverse_module_state->__pyx_codeobj__39);
4737 : Py_VISIT(traverse_module_state->__pyx_codeobj__41);
4738 : Py_VISIT(traverse_module_state->__pyx_codeobj__43);
4739 : Py_VISIT(traverse_module_state->__pyx_codeobj__44);
4740 : Py_VISIT(traverse_module_state->__pyx_codeobj__45);
4741 : Py_VISIT(traverse_module_state->__pyx_codeobj__47);
4742 : Py_VISIT(traverse_module_state->__pyx_codeobj__48);
4743 : Py_VISIT(traverse_module_state->__pyx_codeobj__49);
4744 : Py_VISIT(traverse_module_state->__pyx_codeobj__51);
4745 : Py_VISIT(traverse_module_state->__pyx_codeobj__53);
4746 : Py_VISIT(traverse_module_state->__pyx_codeobj__55);
4747 : return 0;
4748 : }
4749 : #endif
4750 : /* #### Code section: module_state_defines ### */
4751 : #define __pyx_d __pyx_mstate_global->__pyx_d
4752 : #define __pyx_b __pyx_mstate_global->__pyx_b
4753 : #define __pyx_cython_runtime __pyx_mstate_global->__pyx_cython_runtime
4754 : #define __pyx_empty_tuple __pyx_mstate_global->__pyx_empty_tuple
4755 : #define __pyx_empty_bytes __pyx_mstate_global->__pyx_empty_bytes
4756 : #define __pyx_empty_unicode __pyx_mstate_global->__pyx_empty_unicode
4757 : #ifdef __Pyx_CyFunction_USED
4758 : #define __pyx_CyFunctionType __pyx_mstate_global->__pyx_CyFunctionType
4759 : #endif
4760 : #ifdef __Pyx_FusedFunction_USED
4761 : #define __pyx_FusedFunctionType __pyx_mstate_global->__pyx_FusedFunctionType
4762 : #endif
4763 : #ifdef __Pyx_Generator_USED
4764 : #define __pyx_GeneratorType __pyx_mstate_global->__pyx_GeneratorType
4765 : #endif
4766 : #ifdef __Pyx_IterableCoroutine_USED
4767 : #define __pyx_IterableCoroutineType __pyx_mstate_global->__pyx_IterableCoroutineType
4768 : #endif
4769 : #ifdef __Pyx_Coroutine_USED
4770 : #define __pyx_CoroutineAwaitType __pyx_mstate_global->__pyx_CoroutineAwaitType
4771 : #endif
4772 : #ifdef __Pyx_Coroutine_USED
4773 : #define __pyx_CoroutineType __pyx_mstate_global->__pyx_CoroutineType
4774 : #endif
4775 : #if CYTHON_USE_MODULE_STATE
4776 : #endif
4777 : #if CYTHON_USE_MODULE_STATE
4778 : #endif
4779 : #if CYTHON_USE_MODULE_STATE
4780 : #endif
4781 : #if CYTHON_USE_MODULE_STATE
4782 : #endif
4783 : #if CYTHON_USE_MODULE_STATE
4784 : #endif
4785 : #if CYTHON_USE_MODULE_STATE
4786 : #endif
4787 : #if CYTHON_USE_MODULE_STATE
4788 : #endif
4789 : #define __pyx_ptype_7cpython_4type_type __pyx_mstate_global->__pyx_ptype_7cpython_4type_type
4790 : #if CYTHON_USE_MODULE_STATE
4791 : #endif
4792 : #if CYTHON_USE_MODULE_STATE
4793 : #endif
4794 : #if CYTHON_USE_MODULE_STATE
4795 : #endif
4796 : #if CYTHON_USE_MODULE_STATE
4797 : #endif
4798 : #if CYTHON_USE_MODULE_STATE
4799 : #endif
4800 : #define __pyx_ptype_5numpy_dtype __pyx_mstate_global->__pyx_ptype_5numpy_dtype
4801 : #define __pyx_ptype_5numpy_flatiter __pyx_mstate_global->__pyx_ptype_5numpy_flatiter
4802 : #define __pyx_ptype_5numpy_broadcast __pyx_mstate_global->__pyx_ptype_5numpy_broadcast
4803 : #define __pyx_ptype_5numpy_ndarray __pyx_mstate_global->__pyx_ptype_5numpy_ndarray
4804 : #define __pyx_ptype_5numpy_generic __pyx_mstate_global->__pyx_ptype_5numpy_generic
4805 : #define __pyx_ptype_5numpy_number __pyx_mstate_global->__pyx_ptype_5numpy_number
4806 : #define __pyx_ptype_5numpy_integer __pyx_mstate_global->__pyx_ptype_5numpy_integer
4807 : #define __pyx_ptype_5numpy_signedinteger __pyx_mstate_global->__pyx_ptype_5numpy_signedinteger
4808 : #define __pyx_ptype_5numpy_unsignedinteger __pyx_mstate_global->__pyx_ptype_5numpy_unsignedinteger
4809 : #define __pyx_ptype_5numpy_inexact __pyx_mstate_global->__pyx_ptype_5numpy_inexact
4810 : #define __pyx_ptype_5numpy_floating __pyx_mstate_global->__pyx_ptype_5numpy_floating
4811 : #define __pyx_ptype_5numpy_complexfloating __pyx_mstate_global->__pyx_ptype_5numpy_complexfloating
4812 : #define __pyx_ptype_5numpy_flexible __pyx_mstate_global->__pyx_ptype_5numpy_flexible
4813 : #define __pyx_ptype_5numpy_character __pyx_mstate_global->__pyx_ptype_5numpy_character
4814 : #define __pyx_ptype_5numpy_ufunc __pyx_mstate_global->__pyx_ptype_5numpy_ufunc
4815 : #if CYTHON_USE_MODULE_STATE
4816 : #define __pyx_type___pyx_array __pyx_mstate_global->__pyx_type___pyx_array
4817 : #define __pyx_type___pyx_MemviewEnum __pyx_mstate_global->__pyx_type___pyx_MemviewEnum
4818 : #define __pyx_type___pyx_memoryview __pyx_mstate_global->__pyx_type___pyx_memoryview
4819 : #define __pyx_type___pyx_memoryviewslice __pyx_mstate_global->__pyx_type___pyx_memoryviewslice
4820 : #endif
4821 : #define __pyx_array_type __pyx_mstate_global->__pyx_array_type
4822 : #define __pyx_MemviewEnum_type __pyx_mstate_global->__pyx_MemviewEnum_type
4823 : #define __pyx_memoryview_type __pyx_mstate_global->__pyx_memoryview_type
4824 : #define __pyx_memoryviewslice_type __pyx_mstate_global->__pyx_memoryviewslice_type
4825 : #define __pyx_kp_u_ __pyx_mstate_global->__pyx_kp_u_
4826 : #define __pyx_n_s_ASCII __pyx_mstate_global->__pyx_n_s_ASCII
4827 : #define __pyx_kp_s_All_dimensions_preceding_dimensi __pyx_mstate_global->__pyx_kp_s_All_dimensions_preceding_dimensi
4828 : #define __pyx_n_s_AssertionError __pyx_mstate_global->__pyx_n_s_AssertionError
4829 : #define __pyx_kp_s_Buffer_view_does_not_expose_stri __pyx_mstate_global->__pyx_kp_s_Buffer_view_does_not_expose_stri
4830 : #define __pyx_kp_s_Can_only_create_a_buffer_that_is __pyx_mstate_global->__pyx_kp_s_Can_only_create_a_buffer_that_is
4831 : #define __pyx_kp_s_Cannot_assign_to_read_only_memor __pyx_mstate_global->__pyx_kp_s_Cannot_assign_to_read_only_memor
4832 : #define __pyx_kp_s_Cannot_create_writable_memory_vi __pyx_mstate_global->__pyx_kp_s_Cannot_create_writable_memory_vi
4833 : #define __pyx_kp_u_Cannot_index_with_type __pyx_mstate_global->__pyx_kp_u_Cannot_index_with_type
4834 : #define __pyx_kp_s_Cannot_transpose_memoryview_with __pyx_mstate_global->__pyx_kp_s_Cannot_transpose_memoryview_with
4835 : #define __pyx_kp_s_Dimension_d_is_not_direct __pyx_mstate_global->__pyx_kp_s_Dimension_d_is_not_direct
4836 : #define __pyx_n_s_Ellipsis __pyx_mstate_global->__pyx_n_s_Ellipsis
4837 : #define __pyx_kp_s_Empty_shape_tuple_for_cython_arr __pyx_mstate_global->__pyx_kp_s_Empty_shape_tuple_for_cython_arr
4838 : #define __pyx_kp_s_Expected_at_least_d_argument_s_g __pyx_mstate_global->__pyx_kp_s_Expected_at_least_d_argument_s_g
4839 : #define __pyx_kp_s_Function_call_with_ambiguous_arg __pyx_mstate_global->__pyx_kp_s_Function_call_with_ambiguous_arg
4840 : #define __pyx_n_s_ImportError __pyx_mstate_global->__pyx_n_s_ImportError
4841 : #define __pyx_kp_s_Incompatible_checksums_0x_x_vs_0 __pyx_mstate_global->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0
4842 : #define __pyx_n_s_IndexError __pyx_mstate_global->__pyx_n_s_IndexError
4843 : #define __pyx_kp_s_Index_out_of_bounds_axis_d __pyx_mstate_global->__pyx_kp_s_Index_out_of_bounds_axis_d
4844 : #define __pyx_kp_s_Indirect_dimensions_not_supporte __pyx_mstate_global->__pyx_kp_s_Indirect_dimensions_not_supporte
4845 : #define __pyx_kp_u_Invalid_mode_expected_c_or_fortr __pyx_mstate_global->__pyx_kp_u_Invalid_mode_expected_c_or_fortr
4846 : #define __pyx_kp_u_Invalid_shape_in_axis __pyx_mstate_global->__pyx_kp_u_Invalid_shape_in_axis
4847 : #define __pyx_n_s_MAXDEG __pyx_mstate_global->__pyx_n_s_MAXDEG
4848 : #define __pyx_n_s_MAXDIM __pyx_mstate_global->__pyx_n_s_MAXDIM
4849 : #define __pyx_n_s_MemoryError __pyx_mstate_global->__pyx_n_s_MemoryError
4850 : #define __pyx_kp_s_MemoryView_of_r_at_0x_x __pyx_mstate_global->__pyx_kp_s_MemoryView_of_r_at_0x_x
4851 : #define __pyx_kp_s_MemoryView_of_r_object __pyx_mstate_global->__pyx_kp_s_MemoryView_of_r_object
4852 : #define __pyx_kp_s_No_matching_signature_found __pyx_mstate_global->__pyx_kp_s_No_matching_signature_found
4853 : #define __pyx_n_b_O __pyx_mstate_global->__pyx_n_b_O
4854 : #define __pyx_kp_u_Out_of_bounds_on_buffer_access_a __pyx_mstate_global->__pyx_kp_u_Out_of_bounds_on_buffer_access_a
4855 : #define __pyx_n_s_PickleError __pyx_mstate_global->__pyx_n_s_PickleError
4856 : #define __pyx_n_s_Sequence __pyx_mstate_global->__pyx_n_s_Sequence
4857 : #define __pyx_kp_s_Step_may_not_be_zero_axis_d __pyx_mstate_global->__pyx_kp_s_Step_may_not_be_zero_axis_d
4858 : #define __pyx_n_s_TypeError __pyx_mstate_global->__pyx_n_s_TypeError
4859 : #define __pyx_kp_s_Unable_to_convert_item_to_object __pyx_mstate_global->__pyx_kp_s_Unable_to_convert_item_to_object
4860 : #define __pyx_n_s_ValueError __pyx_mstate_global->__pyx_n_s_ValueError
4861 : #define __pyx_n_s_View_MemoryView __pyx_mstate_global->__pyx_n_s_View_MemoryView
4862 : #define __pyx_kp_s__16 __pyx_mstate_global->__pyx_kp_s__16
4863 : #define __pyx_kp_s__17 __pyx_mstate_global->__pyx_kp_s__17
4864 : #define __pyx_kp_u__17 __pyx_mstate_global->__pyx_kp_u__17
4865 : #define __pyx_kp_u__2 __pyx_mstate_global->__pyx_kp_u__2
4866 : #define __pyx_n_s__3 __pyx_mstate_global->__pyx_n_s__3
4867 : #define __pyx_n_s__56 __pyx_mstate_global->__pyx_n_s__56
4868 : #define __pyx_kp_u__6 __pyx_mstate_global->__pyx_kp_u__6
4869 : #define __pyx_kp_u__7 __pyx_mstate_global->__pyx_kp_u__7
4870 : #define __pyx_n_s_abc __pyx_mstate_global->__pyx_n_s_abc
4871 : #define __pyx_n_s_allocate_buffer __pyx_mstate_global->__pyx_n_s_allocate_buffer
4872 : #define __pyx_kp_u_and __pyx_mstate_global->__pyx_kp_u_and
4873 : #define __pyx_n_s_args __pyx_mstate_global->__pyx_n_s_args
4874 : #define __pyx_n_s_as_file __pyx_mstate_global->__pyx_n_s_as_file
4875 : #define __pyx_n_s_astype __pyx_mstate_global->__pyx_n_s_astype
4876 : #define __pyx_n_s_asyncio_coroutines __pyx_mstate_global->__pyx_n_s_asyncio_coroutines
4877 : #define __pyx_n_s_base __pyx_mstate_global->__pyx_n_s_base
4878 : #define __pyx_n_s_bits __pyx_mstate_global->__pyx_n_s_bits
4879 : #define __pyx_n_s_c __pyx_mstate_global->__pyx_n_s_c
4880 : #define __pyx_n_u_c __pyx_mstate_global->__pyx_n_u_c
4881 : #define __pyx_n_s_categorize __pyx_mstate_global->__pyx_n_s_categorize
4882 : #define __pyx_n_s_class __pyx_mstate_global->__pyx_n_s_class
4883 : #define __pyx_n_s_class_getitem __pyx_mstate_global->__pyx_n_s_class_getitem
4884 : #define __pyx_n_s_cline_in_traceback __pyx_mstate_global->__pyx_n_s_cline_in_traceback
4885 : #define __pyx_n_s_collections __pyx_mstate_global->__pyx_n_s_collections
4886 : #define __pyx_kp_s_collections_abc __pyx_mstate_global->__pyx_kp_s_collections_abc
4887 : #define __pyx_kp_s_contiguous_and_direct __pyx_mstate_global->__pyx_kp_s_contiguous_and_direct
4888 : #define __pyx_kp_s_contiguous_and_indirect __pyx_mstate_global->__pyx_kp_s_contiguous_and_indirect
4889 : #define __pyx_n_s_count __pyx_mstate_global->__pyx_n_s_count
4890 : #define __pyx_n_s_cscramble __pyx_mstate_global->__pyx_n_s_cscramble
4891 : #define __pyx_n_s_curdir __pyx_mstate_global->__pyx_n_s_curdir
4892 : #define __pyx_n_s_defaults __pyx_mstate_global->__pyx_n_s_defaults
4893 : #define __pyx_n_s_dict __pyx_mstate_global->__pyx_n_s_dict
4894 : #define __pyx_n_s_dim __pyx_mstate_global->__pyx_n_s_dim
4895 : #define __pyx_kp_u_disable __pyx_mstate_global->__pyx_kp_u_disable
4896 : #define __pyx_n_s_dns __pyx_mstate_global->__pyx_n_s_dns
4897 : #define __pyx_n_s_dns_poly __pyx_mstate_global->__pyx_n_s_dns_poly
4898 : #define __pyx_n_s_dns_vinit __pyx_mstate_global->__pyx_n_s_dns_vinit
4899 : #define __pyx_n_s_draw __pyx_mstate_global->__pyx_n_s_draw
4900 : #define __pyx_n_s_draws __pyx_mstate_global->__pyx_n_s_draws
4901 : #define __pyx_n_s_dtype __pyx_mstate_global->__pyx_n_s_dtype
4902 : #define __pyx_n_s_dtype_is_object __pyx_mstate_global->__pyx_n_s_dtype_is_object
4903 : #define __pyx_n_s_empty __pyx_mstate_global->__pyx_n_s_empty
4904 : #define __pyx_kp_u_enable __pyx_mstate_global->__pyx_kp_u_enable
4905 : #define __pyx_n_s_encode __pyx_mstate_global->__pyx_n_s_encode
4906 : #define __pyx_n_s_enter __pyx_mstate_global->__pyx_n_s_enter
4907 : #define __pyx_n_s_enumerate __pyx_mstate_global->__pyx_n_s_enumerate
4908 : #define __pyx_n_s_error __pyx_mstate_global->__pyx_n_s_error
4909 : #define __pyx_n_s_exit __pyx_mstate_global->__pyx_n_s_exit
4910 : #define __pyx_n_s_f __pyx_mstate_global->__pyx_n_s_f
4911 : #define __pyx_n_s_fast_forward __pyx_mstate_global->__pyx_n_s_fast_forward
4912 : #define __pyx_n_s_files __pyx_mstate_global->__pyx_n_s_files
4913 : #define __pyx_n_s_fill_p_cumulative __pyx_mstate_global->__pyx_n_s_fill_p_cumulative
4914 : #define __pyx_n_s_flags __pyx_mstate_global->__pyx_n_s_flags
4915 : #define __pyx_n_s_format __pyx_mstate_global->__pyx_n_s_format
4916 : #define __pyx_n_s_fortran __pyx_mstate_global->__pyx_n_s_fortran
4917 : #define __pyx_n_u_fortran __pyx_mstate_global->__pyx_n_u_fortran
4918 : #define __pyx_n_s_fused_sigindex __pyx_mstate_global->__pyx_n_s_fused_sigindex
4919 : #define __pyx_kp_u_gc __pyx_mstate_global->__pyx_kp_u_gc
4920 : #define __pyx_n_s_get __pyx_mstate_global->__pyx_n_s_get
4921 : #define __pyx_n_s_get_poly_vinit __pyx_mstate_global->__pyx_n_s_get_poly_vinit
4922 : #define __pyx_n_s_getstate __pyx_mstate_global->__pyx_n_s_getstate
4923 : #define __pyx_kp_u_got __pyx_mstate_global->__pyx_kp_u_got
4924 : #define __pyx_kp_u_got_differing_extents_in_dimensi __pyx_mstate_global->__pyx_kp_u_got_differing_extents_in_dimensi
4925 : #define __pyx_kp_s_home_czgdp18079_Quansight_scipy __pyx_mstate_global->__pyx_kp_s_home_czgdp18079_Quansight_scipy
4926 : #define __pyx_n_s_id __pyx_mstate_global->__pyx_n_s_id
4927 : #define __pyx_n_s_import __pyx_mstate_global->__pyx_n_s_import
4928 : #define __pyx_n_s_importlib __pyx_mstate_global->__pyx_n_s_importlib
4929 : #define __pyx_n_s_importlib_resources __pyx_mstate_global->__pyx_n_s_importlib_resources
4930 : #define __pyx_n_s_index __pyx_mstate_global->__pyx_n_s_index
4931 : #define __pyx_n_s_initialize_direction_numbers __pyx_mstate_global->__pyx_n_s_initialize_direction_numbers
4932 : #define __pyx_n_s_initialize_v __pyx_mstate_global->__pyx_n_s_initialize_v
4933 : #define __pyx_n_s_initializing __pyx_mstate_global->__pyx_n_s_initializing
4934 : #define __pyx_n_s_is_coroutine __pyx_mstate_global->__pyx_n_s_is_coroutine
4935 : #define __pyx_kp_u_isenabled __pyx_mstate_global->__pyx_kp_u_isenabled
4936 : #define __pyx_n_s_itemsize __pyx_mstate_global->__pyx_n_s_itemsize
4937 : #define __pyx_kp_s_itemsize_0_for_cython_array __pyx_mstate_global->__pyx_kp_s_itemsize_0_for_cython_array
4938 : #define __pyx_n_s_joinpath __pyx_mstate_global->__pyx_n_s_joinpath
4939 : #define __pyx_n_s_kind __pyx_mstate_global->__pyx_n_s_kind
4940 : #define __pyx_n_s_kwargs __pyx_mstate_global->__pyx_n_s_kwargs
4941 : #define __pyx_n_s_load __pyx_mstate_global->__pyx_n_s_load
4942 : #define __pyx_n_s_ltm __pyx_mstate_global->__pyx_n_s_ltm
4943 : #define __pyx_n_s_main __pyx_mstate_global->__pyx_n_s_main
4944 : #define __pyx_n_s_memview __pyx_mstate_global->__pyx_n_s_memview
4945 : #define __pyx_n_s_mode __pyx_mstate_global->__pyx_n_s_mode
4946 : #define __pyx_n_s_n __pyx_mstate_global->__pyx_n_s_n
4947 : #define __pyx_n_s_n_2 __pyx_mstate_global->__pyx_n_s_n_2
4948 : #define __pyx_n_s_name __pyx_mstate_global->__pyx_n_s_name
4949 : #define __pyx_n_s_name_2 __pyx_mstate_global->__pyx_n_s_name_2
4950 : #define __pyx_n_s_ndim __pyx_mstate_global->__pyx_n_s_ndim
4951 : #define __pyx_n_s_new __pyx_mstate_global->__pyx_n_s_new
4952 : #define __pyx_kp_s_no_default___reduce___due_to_non __pyx_mstate_global->__pyx_kp_s_no_default___reduce___due_to_non
4953 : #define __pyx_n_s_np __pyx_mstate_global->__pyx_n_s_np
4954 : #define __pyx_n_s_npzfile __pyx_mstate_global->__pyx_n_s_npzfile
4955 : #define __pyx_n_s_num_gen __pyx_mstate_global->__pyx_n_s_num_gen
4956 : #define __pyx_n_s_num_gen_2 __pyx_mstate_global->__pyx_n_s_num_gen_2
4957 : #define __pyx_n_s_numpy __pyx_mstate_global->__pyx_n_s_numpy
4958 : #define __pyx_kp_u_numpy__core_multiarray_failed_to __pyx_mstate_global->__pyx_kp_u_numpy__core_multiarray_failed_to
4959 : #define __pyx_kp_u_numpy__core_umath_failed_to_impo __pyx_mstate_global->__pyx_kp_u_numpy__core_umath_failed_to_impo
4960 : #define __pyx_n_s_obj __pyx_mstate_global->__pyx_n_s_obj
4961 : #define __pyx_n_s_p __pyx_mstate_global->__pyx_n_s_p
4962 : #define __pyx_n_s_p_cumulative __pyx_mstate_global->__pyx_n_s_p_cumulative
4963 : #define __pyx_n_s_pack __pyx_mstate_global->__pyx_n_s_pack
4964 : #define __pyx_n_s_pickle __pyx_mstate_global->__pyx_n_s_pickle
4965 : #define __pyx_n_s_poly __pyx_mstate_global->__pyx_n_s_poly
4966 : #define __pyx_n_u_poly __pyx_mstate_global->__pyx_n_u_poly
4967 : #define __pyx_n_s_poly_dict __pyx_mstate_global->__pyx_n_s_poly_dict
4968 : #define __pyx_n_s_poly_vinit __pyx_mstate_global->__pyx_n_s_poly_vinit
4969 : #define __pyx_n_s_pyx_PickleError __pyx_mstate_global->__pyx_n_s_pyx_PickleError
4970 : #define __pyx_n_s_pyx_checksum __pyx_mstate_global->__pyx_n_s_pyx_checksum
4971 : #define __pyx_n_s_pyx_fuse_0_cscramble __pyx_mstate_global->__pyx_n_s_pyx_fuse_0_cscramble
4972 : #define __pyx_n_s_pyx_fuse_0_fast_forward __pyx_mstate_global->__pyx_n_s_pyx_fuse_0_fast_forward
4973 : #define __pyx_n_s_pyx_fuse_0_initialize_v __pyx_mstate_global->__pyx_n_s_pyx_fuse_0_initialize_v
4974 : #define __pyx_n_s_pyx_fuse_1_cscramble __pyx_mstate_global->__pyx_n_s_pyx_fuse_1_cscramble
4975 : #define __pyx_n_s_pyx_fuse_1_fast_forward __pyx_mstate_global->__pyx_n_s_pyx_fuse_1_fast_forward
4976 : #define __pyx_n_s_pyx_fuse_1_initialize_v __pyx_mstate_global->__pyx_n_s_pyx_fuse_1_initialize_v
4977 : #define __pyx_n_s_pyx_result __pyx_mstate_global->__pyx_n_s_pyx_result
4978 : #define __pyx_n_s_pyx_state __pyx_mstate_global->__pyx_n_s_pyx_state
4979 : #define __pyx_n_s_pyx_type __pyx_mstate_global->__pyx_n_s_pyx_type
4980 : #define __pyx_n_s_pyx_unpickle_Enum __pyx_mstate_global->__pyx_n_s_pyx_unpickle_Enum
4981 : #define __pyx_n_s_pyx_vtable __pyx_mstate_global->__pyx_n_s_pyx_vtable
4982 : #define __pyx_n_s_quasi __pyx_mstate_global->__pyx_n_s_quasi
4983 : #define __pyx_n_s_range __pyx_mstate_global->__pyx_n_s_range
4984 : #define __pyx_n_s_reduce __pyx_mstate_global->__pyx_n_s_reduce
4985 : #define __pyx_n_s_reduce_cython __pyx_mstate_global->__pyx_n_s_reduce_cython
4986 : #define __pyx_n_s_reduce_ex __pyx_mstate_global->__pyx_n_s_reduce_ex
4987 : #define __pyx_n_s_register __pyx_mstate_global->__pyx_n_s_register
4988 : #define __pyx_n_s_resources __pyx_mstate_global->__pyx_n_s_resources
4989 : #define __pyx_n_s_result __pyx_mstate_global->__pyx_n_s_result
4990 : #define __pyx_n_s_s __pyx_mstate_global->__pyx_n_s_s
4991 : #define __pyx_n_s_sample __pyx_mstate_global->__pyx_n_s_sample
4992 : #define __pyx_n_s_scale __pyx_mstate_global->__pyx_n_s_scale
4993 : #define __pyx_kp_u_scipy_stats __pyx_mstate_global->__pyx_kp_u_scipy_stats
4994 : #define __pyx_n_s_scipy_stats__sobol __pyx_mstate_global->__pyx_n_s_scipy_stats__sobol
4995 : #define __pyx_n_s_setstate __pyx_mstate_global->__pyx_n_s_setstate
4996 : #define __pyx_n_s_setstate_cython __pyx_mstate_global->__pyx_n_s_setstate_cython
4997 : #define __pyx_n_s_shape __pyx_mstate_global->__pyx_n_s_shape
4998 : #define __pyx_n_s_signatures __pyx_mstate_global->__pyx_n_s_signatures
4999 : #define __pyx_n_s_size __pyx_mstate_global->__pyx_n_s_size
5000 : #define __pyx_kp_u_sobol_direction_numbers_npz __pyx_mstate_global->__pyx_kp_u_sobol_direction_numbers_npz
5001 : #define __pyx_n_s_spec __pyx_mstate_global->__pyx_n_s_spec
5002 : #define __pyx_n_s_split __pyx_mstate_global->__pyx_n_s_split
5003 : #define __pyx_n_s_start __pyx_mstate_global->__pyx_n_s_start
5004 : #define __pyx_n_s_step __pyx_mstate_global->__pyx_n_s_step
5005 : #define __pyx_n_s_stop __pyx_mstate_global->__pyx_n_s_stop
5006 : #define __pyx_kp_s_strided_and_direct __pyx_mstate_global->__pyx_kp_s_strided_and_direct
5007 : #define __pyx_kp_s_strided_and_direct_or_indirect __pyx_mstate_global->__pyx_kp_s_strided_and_direct_or_indirect
5008 : #define __pyx_kp_s_strided_and_indirect __pyx_mstate_global->__pyx_kp_s_strided_and_indirect
5009 : #define __pyx_kp_s_stringsource __pyx_mstate_global->__pyx_kp_s_stringsource
5010 : #define __pyx_n_s_strip __pyx_mstate_global->__pyx_n_s_strip
5011 : #define __pyx_n_s_struct __pyx_mstate_global->__pyx_n_s_struct
5012 : #define __pyx_n_s_sv __pyx_mstate_global->__pyx_n_s_sv
5013 : #define __pyx_n_s_sys __pyx_mstate_global->__pyx_n_s_sys
5014 : #define __pyx_n_s_test __pyx_mstate_global->__pyx_n_s_test
5015 : #define __pyx_n_s_test_find_index __pyx_mstate_global->__pyx_n_s_test_find_index
5016 : #define __pyx_n_s_uint32 __pyx_mstate_global->__pyx_n_s_uint32
5017 : #define __pyx_n_s_uint32_t __pyx_mstate_global->__pyx_n_s_uint32_t
5018 : #define __pyx_n_s_uint64 __pyx_mstate_global->__pyx_n_s_uint64
5019 : #define __pyx_n_s_uint64_t __pyx_mstate_global->__pyx_n_s_uint64_t
5020 : #define __pyx_kp_s_unable_to_allocate_array_data __pyx_mstate_global->__pyx_kp_s_unable_to_allocate_array_data
5021 : #define __pyx_kp_s_unable_to_allocate_shape_and_str __pyx_mstate_global->__pyx_kp_s_unable_to_allocate_shape_and_str
5022 : #define __pyx_n_s_unpack __pyx_mstate_global->__pyx_n_s_unpack
5023 : #define __pyx_n_s_update __pyx_mstate_global->__pyx_n_s_update
5024 : #define __pyx_n_s_v __pyx_mstate_global->__pyx_n_s_v
5025 : #define __pyx_n_s_value __pyx_mstate_global->__pyx_n_s_value
5026 : #define __pyx_n_s_values __pyx_mstate_global->__pyx_n_s_values
5027 : #define __pyx_n_s_version_info __pyx_mstate_global->__pyx_n_s_version_info
5028 : #define __pyx_n_s_vinit __pyx_mstate_global->__pyx_n_s_vinit
5029 : #define __pyx_n_u_vinit __pyx_mstate_global->__pyx_n_u_vinit
5030 : #define __pyx_n_s_vinit_dict __pyx_mstate_global->__pyx_n_s_vinit_dict
5031 : #define __pyx_int_0 __pyx_mstate_global->__pyx_int_0
5032 : #define __pyx_int_1 __pyx_mstate_global->__pyx_int_1
5033 : #define __pyx_int_3 __pyx_mstate_global->__pyx_int_3
5034 : #define __pyx_int_4 __pyx_mstate_global->__pyx_int_4
5035 : #define __pyx_int_5 __pyx_mstate_global->__pyx_int_5
5036 : #define __pyx_int_7 __pyx_mstate_global->__pyx_int_7
5037 : #define __pyx_int_18 __pyx_mstate_global->__pyx_int_18
5038 : #define __pyx_int_21201 __pyx_mstate_global->__pyx_int_21201
5039 : #define __pyx_int_112105877 __pyx_mstate_global->__pyx_int_112105877
5040 : #define __pyx_int_136983863 __pyx_mstate_global->__pyx_int_136983863
5041 : #define __pyx_int_184977713 __pyx_mstate_global->__pyx_int_184977713
5042 : #define __pyx_int_neg_1 __pyx_mstate_global->__pyx_int_neg_1
5043 : #define __pyx_slice__5 __pyx_mstate_global->__pyx_slice__5
5044 : #define __pyx_tuple__4 __pyx_mstate_global->__pyx_tuple__4
5045 : #define __pyx_tuple__8 __pyx_mstate_global->__pyx_tuple__8
5046 : #define __pyx_tuple__9 __pyx_mstate_global->__pyx_tuple__9
5047 : #define __pyx_tuple__10 __pyx_mstate_global->__pyx_tuple__10
5048 : #define __pyx_tuple__11 __pyx_mstate_global->__pyx_tuple__11
5049 : #define __pyx_tuple__12 __pyx_mstate_global->__pyx_tuple__12
5050 : #define __pyx_tuple__13 __pyx_mstate_global->__pyx_tuple__13
5051 : #define __pyx_tuple__14 __pyx_mstate_global->__pyx_tuple__14
5052 : #define __pyx_tuple__15 __pyx_mstate_global->__pyx_tuple__15
5053 : #define __pyx_tuple__18 __pyx_mstate_global->__pyx_tuple__18
5054 : #define __pyx_tuple__19 __pyx_mstate_global->__pyx_tuple__19
5055 : #define __pyx_tuple__20 __pyx_mstate_global->__pyx_tuple__20
5056 : #define __pyx_tuple__21 __pyx_mstate_global->__pyx_tuple__21
5057 : #define __pyx_tuple__22 __pyx_mstate_global->__pyx_tuple__22
5058 : #define __pyx_tuple__23 __pyx_mstate_global->__pyx_tuple__23
5059 : #define __pyx_tuple__24 __pyx_mstate_global->__pyx_tuple__24
5060 : #define __pyx_tuple__25 __pyx_mstate_global->__pyx_tuple__25
5061 : #define __pyx_tuple__26 __pyx_mstate_global->__pyx_tuple__26
5062 : #define __pyx_tuple__27 __pyx_mstate_global->__pyx_tuple__27
5063 : #define __pyx_tuple__28 __pyx_mstate_global->__pyx_tuple__28
5064 : #define __pyx_tuple__29 __pyx_mstate_global->__pyx_tuple__29
5065 : #define __pyx_tuple__31 __pyx_mstate_global->__pyx_tuple__31
5066 : #define __pyx_tuple__32 __pyx_mstate_global->__pyx_tuple__32
5067 : #define __pyx_tuple__34 __pyx_mstate_global->__pyx_tuple__34
5068 : #define __pyx_tuple__36 __pyx_mstate_global->__pyx_tuple__36
5069 : #define __pyx_tuple__40 __pyx_mstate_global->__pyx_tuple__40
5070 : #define __pyx_tuple__42 __pyx_mstate_global->__pyx_tuple__42
5071 : #define __pyx_tuple__46 __pyx_mstate_global->__pyx_tuple__46
5072 : #define __pyx_tuple__50 __pyx_mstate_global->__pyx_tuple__50
5073 : #define __pyx_tuple__52 __pyx_mstate_global->__pyx_tuple__52
5074 : #define __pyx_tuple__54 __pyx_mstate_global->__pyx_tuple__54
5075 : #define __pyx_codeobj__30 __pyx_mstate_global->__pyx_codeobj__30
5076 : #define __pyx_codeobj__33 __pyx_mstate_global->__pyx_codeobj__33
5077 : #define __pyx_codeobj__35 __pyx_mstate_global->__pyx_codeobj__35
5078 : #define __pyx_codeobj__37 __pyx_mstate_global->__pyx_codeobj__37
5079 : #define __pyx_codeobj__38 __pyx_mstate_global->__pyx_codeobj__38
5080 : #define __pyx_codeobj__39 __pyx_mstate_global->__pyx_codeobj__39
5081 : #define __pyx_codeobj__41 __pyx_mstate_global->__pyx_codeobj__41
5082 : #define __pyx_codeobj__43 __pyx_mstate_global->__pyx_codeobj__43
5083 : #define __pyx_codeobj__44 __pyx_mstate_global->__pyx_codeobj__44
5084 : #define __pyx_codeobj__45 __pyx_mstate_global->__pyx_codeobj__45
5085 : #define __pyx_codeobj__47 __pyx_mstate_global->__pyx_codeobj__47
5086 : #define __pyx_codeobj__48 __pyx_mstate_global->__pyx_codeobj__48
5087 : #define __pyx_codeobj__49 __pyx_mstate_global->__pyx_codeobj__49
5088 : #define __pyx_codeobj__51 __pyx_mstate_global->__pyx_codeobj__51
5089 : #define __pyx_codeobj__53 __pyx_mstate_global->__pyx_codeobj__53
5090 : #define __pyx_codeobj__55 __pyx_mstate_global->__pyx_codeobj__55
5091 : /* #### Code section: module_code ### */
5092 :
5093 : /* "View.MemoryView":131
5094 : * cdef bint dtype_is_object
5095 : *
5096 : * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<<
5097 : * mode="c", bint allocate_buffer=True):
5098 : *
5099 : */
5100 :
5101 : /* Python wrapper */
5102 : static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5103 0 : static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5104 0 : PyObject *__pyx_v_shape = 0;
5105 0 : Py_ssize_t __pyx_v_itemsize;
5106 0 : PyObject *__pyx_v_format = 0;
5107 0 : PyObject *__pyx_v_mode = 0;
5108 0 : int __pyx_v_allocate_buffer;
5109 0 : CYTHON_UNUSED Py_ssize_t __pyx_nargs;
5110 0 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
5111 0 : PyObject* values[5] = {0,0,0,0,0};
5112 0 : int __pyx_lineno = 0;
5113 0 : const char *__pyx_filename = NULL;
5114 0 : int __pyx_clineno = 0;
5115 0 : int __pyx_r;
5116 : __Pyx_RefNannyDeclarations
5117 0 : __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
5118 : #if CYTHON_ASSUME_SAFE_MACROS
5119 0 : __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
5120 : #else
5121 : __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
5122 : #endif
5123 0 : __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
5124 : {
5125 0 : PyObject **__pyx_pyargnames[] = {&__pyx_n_s_shape,&__pyx_n_s_itemsize,&__pyx_n_s_format,&__pyx_n_s_mode,&__pyx_n_s_allocate_buffer,0};
5126 0 : values[3] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)__pyx_n_s_c));
5127 0 : if (__pyx_kwds) {
5128 0 : Py_ssize_t kw_args;
5129 0 : switch (__pyx_nargs) {
5130 0 : case 5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
5131 0 : CYTHON_FALLTHROUGH;
5132 0 : case 4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
5133 0 : CYTHON_FALLTHROUGH;
5134 0 : case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
5135 0 : CYTHON_FALLTHROUGH;
5136 0 : case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
5137 0 : CYTHON_FALLTHROUGH;
5138 0 : case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
5139 0 : CYTHON_FALLTHROUGH;
5140 0 : case 0: break;
5141 0 : default: goto __pyx_L5_argtuple_error;
5142 : }
5143 0 : kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
5144 0 : switch (__pyx_nargs) {
5145 0 : case 0:
5146 0 : if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_shape)) != 0)) {
5147 0 : (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
5148 0 : kw_args--;
5149 : }
5150 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 131, __pyx_L3_error)
5151 0 : else goto __pyx_L5_argtuple_error;
5152 0 : CYTHON_FALLTHROUGH;
5153 : case 1:
5154 0 : if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_itemsize)) != 0)) {
5155 0 : (void)__Pyx_Arg_NewRef_VARARGS(values[1]);
5156 0 : kw_args--;
5157 : }
5158 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 131, __pyx_L3_error)
5159 : else {
5160 0 : __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 1); __PYX_ERR(1, 131, __pyx_L3_error)
5161 : }
5162 0 : CYTHON_FALLTHROUGH;
5163 : case 2:
5164 0 : if (likely((values[2] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_format)) != 0)) {
5165 0 : (void)__Pyx_Arg_NewRef_VARARGS(values[2]);
5166 0 : kw_args--;
5167 : }
5168 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 131, __pyx_L3_error)
5169 : else {
5170 0 : __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 2); __PYX_ERR(1, 131, __pyx_L3_error)
5171 : }
5172 0 : CYTHON_FALLTHROUGH;
5173 : case 3:
5174 0 : if (kw_args > 0) {
5175 0 : PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_mode);
5176 0 : if (value) { values[3] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
5177 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 131, __pyx_L3_error)
5178 : }
5179 0 : CYTHON_FALLTHROUGH;
5180 : case 4:
5181 0 : if (kw_args > 0) {
5182 0 : PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_allocate_buffer);
5183 0 : if (value) { values[4] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
5184 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 131, __pyx_L3_error)
5185 : }
5186 : }
5187 0 : if (unlikely(kw_args > 0)) {
5188 0 : const Py_ssize_t kwd_pos_args = __pyx_nargs;
5189 0 : if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(1, 131, __pyx_L3_error)
5190 : }
5191 : } else {
5192 0 : switch (__pyx_nargs) {
5193 0 : case 5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
5194 0 : CYTHON_FALLTHROUGH;
5195 0 : case 4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
5196 0 : CYTHON_FALLTHROUGH;
5197 0 : case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
5198 0 : values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
5199 0 : values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
5200 0 : break;
5201 0 : default: goto __pyx_L5_argtuple_error;
5202 : }
5203 : }
5204 0 : __pyx_v_shape = ((PyObject*)values[0]);
5205 0 : __pyx_v_itemsize = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_itemsize == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 131, __pyx_L3_error)
5206 0 : __pyx_v_format = values[2];
5207 0 : __pyx_v_mode = values[3];
5208 0 : if (values[4]) {
5209 0 : __pyx_v_allocate_buffer = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_allocate_buffer == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 132, __pyx_L3_error)
5210 : } else {
5211 :
5212 : /* "View.MemoryView":132
5213 : *
5214 : * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,
5215 : * mode="c", bint allocate_buffer=True): # <<<<<<<<<<<<<<
5216 : *
5217 : * cdef int idx
5218 : */
5219 : __pyx_v_allocate_buffer = ((int)1);
5220 : }
5221 : }
5222 0 : goto __pyx_L6_skip;
5223 0 : __pyx_L5_argtuple_error:;
5224 0 : __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, __pyx_nargs); __PYX_ERR(1, 131, __pyx_L3_error)
5225 0 : __pyx_L6_skip:;
5226 0 : goto __pyx_L4_argument_unpacking_done;
5227 0 : __pyx_L3_error:;
5228 : {
5229 0 : Py_ssize_t __pyx_temp;
5230 0 : for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
5231 : __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
5232 : }
5233 : }
5234 0 : __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5235 0 : __Pyx_RefNannyFinishContext();
5236 0 : return -1;
5237 0 : __pyx_L4_argument_unpacking_done:;
5238 0 : if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_shape), (&PyTuple_Type), 1, "shape", 1))) __PYX_ERR(1, 131, __pyx_L1_error)
5239 0 : if (unlikely(((PyObject *)__pyx_v_format) == Py_None)) {
5240 0 : PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "format"); __PYX_ERR(1, 131, __pyx_L1_error)
5241 : }
5242 0 : __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(((struct __pyx_array_obj *)__pyx_v_self), __pyx_v_shape, __pyx_v_itemsize, __pyx_v_format, __pyx_v_mode, __pyx_v_allocate_buffer);
5243 :
5244 : /* "View.MemoryView":131
5245 : * cdef bint dtype_is_object
5246 : *
5247 : * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<<
5248 : * mode="c", bint allocate_buffer=True):
5249 : *
5250 : */
5251 :
5252 : /* function exit code */
5253 0 : goto __pyx_L0;
5254 : __pyx_L1_error:;
5255 : __pyx_r = -1;
5256 0 : __pyx_L0:;
5257 : {
5258 0 : Py_ssize_t __pyx_temp;
5259 0 : for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
5260 : __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
5261 : }
5262 : }
5263 : __Pyx_RefNannyFinishContext();
5264 : return __pyx_r;
5265 : }
5266 :
5267 0 : static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer) {
5268 0 : int __pyx_v_idx;
5269 0 : Py_ssize_t __pyx_v_dim;
5270 0 : char __pyx_v_order;
5271 0 : int __pyx_r;
5272 : __Pyx_RefNannyDeclarations
5273 0 : Py_ssize_t __pyx_t_1;
5274 0 : int __pyx_t_2;
5275 0 : int __pyx_t_3;
5276 0 : PyObject *__pyx_t_4 = NULL;
5277 0 : PyObject *__pyx_t_5 = NULL;
5278 0 : PyObject *__pyx_t_6 = NULL;
5279 0 : unsigned int __pyx_t_7;
5280 0 : char *__pyx_t_8;
5281 0 : int __pyx_t_9;
5282 0 : Py_ssize_t __pyx_t_10;
5283 0 : Py_UCS4 __pyx_t_11;
5284 0 : int __pyx_lineno = 0;
5285 0 : const char *__pyx_filename = NULL;
5286 0 : int __pyx_clineno = 0;
5287 0 : __Pyx_RefNannySetupContext("__cinit__", 0);
5288 0 : __Pyx_INCREF(__pyx_v_format);
5289 :
5290 : /* "View.MemoryView":137
5291 : * cdef Py_ssize_t dim
5292 : *
5293 : * self.ndim = <int> len(shape) # <<<<<<<<<<<<<<
5294 : * self.itemsize = itemsize
5295 : *
5296 : */
5297 0 : if (unlikely(__pyx_v_shape == Py_None)) {
5298 0 : PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
5299 0 : __PYX_ERR(1, 137, __pyx_L1_error)
5300 : }
5301 0 : __pyx_t_1 = __Pyx_PyTuple_GET_SIZE(__pyx_v_shape); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(1, 137, __pyx_L1_error)
5302 0 : __pyx_v_self->ndim = ((int)__pyx_t_1);
5303 :
5304 : /* "View.MemoryView":138
5305 : *
5306 : * self.ndim = <int> len(shape)
5307 : * self.itemsize = itemsize # <<<<<<<<<<<<<<
5308 : *
5309 : * if not self.ndim:
5310 : */
5311 0 : __pyx_v_self->itemsize = __pyx_v_itemsize;
5312 :
5313 : /* "View.MemoryView":140
5314 : * self.itemsize = itemsize
5315 : *
5316 : * if not self.ndim: # <<<<<<<<<<<<<<
5317 : * raise ValueError, "Empty shape tuple for cython.array"
5318 : *
5319 : */
5320 0 : __pyx_t_2 = (!(__pyx_v_self->ndim != 0));
5321 0 : if (unlikely(__pyx_t_2)) {
5322 :
5323 : /* "View.MemoryView":141
5324 : *
5325 : * if not self.ndim:
5326 : * raise ValueError, "Empty shape tuple for cython.array" # <<<<<<<<<<<<<<
5327 : *
5328 : * if itemsize <= 0:
5329 : */
5330 0 : __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Empty_shape_tuple_for_cython_arr, 0, 0);
5331 0 : __PYX_ERR(1, 141, __pyx_L1_error)
5332 :
5333 : /* "View.MemoryView":140
5334 : * self.itemsize = itemsize
5335 : *
5336 : * if not self.ndim: # <<<<<<<<<<<<<<
5337 : * raise ValueError, "Empty shape tuple for cython.array"
5338 : *
5339 : */
5340 : }
5341 :
5342 : /* "View.MemoryView":143
5343 : * raise ValueError, "Empty shape tuple for cython.array"
5344 : *
5345 : * if itemsize <= 0: # <<<<<<<<<<<<<<
5346 : * raise ValueError, "itemsize <= 0 for cython.array"
5347 : *
5348 : */
5349 0 : __pyx_t_2 = (__pyx_v_itemsize <= 0);
5350 0 : if (unlikely(__pyx_t_2)) {
5351 :
5352 : /* "View.MemoryView":144
5353 : *
5354 : * if itemsize <= 0:
5355 : * raise ValueError, "itemsize <= 0 for cython.array" # <<<<<<<<<<<<<<
5356 : *
5357 : * if not isinstance(format, bytes):
5358 : */
5359 0 : __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_itemsize_0_for_cython_array, 0, 0);
5360 0 : __PYX_ERR(1, 144, __pyx_L1_error)
5361 :
5362 : /* "View.MemoryView":143
5363 : * raise ValueError, "Empty shape tuple for cython.array"
5364 : *
5365 : * if itemsize <= 0: # <<<<<<<<<<<<<<
5366 : * raise ValueError, "itemsize <= 0 for cython.array"
5367 : *
5368 : */
5369 : }
5370 :
5371 : /* "View.MemoryView":146
5372 : * raise ValueError, "itemsize <= 0 for cython.array"
5373 : *
5374 : * if not isinstance(format, bytes): # <<<<<<<<<<<<<<
5375 : * format = format.encode('ASCII')
5376 : * self._format = format # keep a reference to the byte string
5377 : */
5378 0 : __pyx_t_2 = PyBytes_Check(__pyx_v_format);
5379 0 : __pyx_t_3 = (!__pyx_t_2);
5380 0 : if (__pyx_t_3) {
5381 :
5382 : /* "View.MemoryView":147
5383 : *
5384 : * if not isinstance(format, bytes):
5385 : * format = format.encode('ASCII') # <<<<<<<<<<<<<<
5386 : * self._format = format # keep a reference to the byte string
5387 : * self.format = self._format
5388 : */
5389 0 : __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 147, __pyx_L1_error)
5390 0 : __Pyx_GOTREF(__pyx_t_5);
5391 0 : __pyx_t_6 = NULL;
5392 0 : __pyx_t_7 = 0;
5393 : #if CYTHON_UNPACK_METHODS
5394 0 : if (likely(PyMethod_Check(__pyx_t_5))) {
5395 0 : __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
5396 0 : if (likely(__pyx_t_6)) {
5397 0 : PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
5398 0 : __Pyx_INCREF(__pyx_t_6);
5399 0 : __Pyx_INCREF(function);
5400 0 : __Pyx_DECREF_SET(__pyx_t_5, function);
5401 : __pyx_t_7 = 1;
5402 : }
5403 : }
5404 : #endif
5405 : {
5406 0 : PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_n_s_ASCII};
5407 0 : __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
5408 0 : __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
5409 0 : if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 147, __pyx_L1_error)
5410 0 : __Pyx_GOTREF(__pyx_t_4);
5411 0 : __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5412 : }
5413 0 : __Pyx_DECREF_SET(__pyx_v_format, __pyx_t_4);
5414 : __pyx_t_4 = 0;
5415 :
5416 : /* "View.MemoryView":146
5417 : * raise ValueError, "itemsize <= 0 for cython.array"
5418 : *
5419 : * if not isinstance(format, bytes): # <<<<<<<<<<<<<<
5420 : * format = format.encode('ASCII')
5421 : * self._format = format # keep a reference to the byte string
5422 : */
5423 : }
5424 :
5425 : /* "View.MemoryView":148
5426 : * if not isinstance(format, bytes):
5427 : * format = format.encode('ASCII')
5428 : * self._format = format # keep a reference to the byte string # <<<<<<<<<<<<<<
5429 : * self.format = self._format
5430 : *
5431 : */
5432 0 : if (!(likely(PyBytes_CheckExact(__pyx_v_format))||((__pyx_v_format) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_v_format))) __PYX_ERR(1, 148, __pyx_L1_error)
5433 0 : __pyx_t_4 = __pyx_v_format;
5434 0 : __Pyx_INCREF(__pyx_t_4);
5435 0 : __Pyx_GIVEREF(__pyx_t_4);
5436 0 : __Pyx_GOTREF(__pyx_v_self->_format);
5437 0 : __Pyx_DECREF(__pyx_v_self->_format);
5438 0 : __pyx_v_self->_format = ((PyObject*)__pyx_t_4);
5439 0 : __pyx_t_4 = 0;
5440 :
5441 : /* "View.MemoryView":149
5442 : * format = format.encode('ASCII')
5443 : * self._format = format # keep a reference to the byte string
5444 : * self.format = self._format # <<<<<<<<<<<<<<
5445 : *
5446 : *
5447 : */
5448 0 : if (unlikely(__pyx_v_self->_format == Py_None)) {
5449 0 : PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
5450 0 : __PYX_ERR(1, 149, __pyx_L1_error)
5451 : }
5452 0 : __pyx_t_8 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->_format); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(1, 149, __pyx_L1_error)
5453 0 : __pyx_v_self->format = __pyx_t_8;
5454 :
5455 : /* "View.MemoryView":152
5456 : *
5457 : *
5458 : * self._shape = <Py_ssize_t *> PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2) # <<<<<<<<<<<<<<
5459 : * self._strides = self._shape + self.ndim
5460 : *
5461 : */
5462 0 : __pyx_v_self->_shape = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * __pyx_v_self->ndim) * 2)));
5463 :
5464 : /* "View.MemoryView":153
5465 : *
5466 : * self._shape = <Py_ssize_t *> PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2)
5467 : * self._strides = self._shape + self.ndim # <<<<<<<<<<<<<<
5468 : *
5469 : * if not self._shape:
5470 : */
5471 0 : __pyx_v_self->_strides = (__pyx_v_self->_shape + __pyx_v_self->ndim);
5472 :
5473 : /* "View.MemoryView":155
5474 : * self._strides = self._shape + self.ndim
5475 : *
5476 : * if not self._shape: # <<<<<<<<<<<<<<
5477 : * raise MemoryError, "unable to allocate shape and strides."
5478 : *
5479 : */
5480 0 : __pyx_t_3 = (!(__pyx_v_self->_shape != 0));
5481 0 : if (unlikely(__pyx_t_3)) {
5482 :
5483 : /* "View.MemoryView":156
5484 : *
5485 : * if not self._shape:
5486 : * raise MemoryError, "unable to allocate shape and strides." # <<<<<<<<<<<<<<
5487 : *
5488 : *
5489 : */
5490 0 : __Pyx_Raise(__pyx_builtin_MemoryError, __pyx_kp_s_unable_to_allocate_shape_and_str, 0, 0);
5491 0 : __PYX_ERR(1, 156, __pyx_L1_error)
5492 :
5493 : /* "View.MemoryView":155
5494 : * self._strides = self._shape + self.ndim
5495 : *
5496 : * if not self._shape: # <<<<<<<<<<<<<<
5497 : * raise MemoryError, "unable to allocate shape and strides."
5498 : *
5499 : */
5500 : }
5501 :
5502 : /* "View.MemoryView":159
5503 : *
5504 : *
5505 : * for idx, dim in enumerate(shape): # <<<<<<<<<<<<<<
5506 : * if dim <= 0:
5507 : * raise ValueError, f"Invalid shape in axis {idx}: {dim}."
5508 : */
5509 0 : __pyx_t_9 = 0;
5510 0 : __pyx_t_4 = __pyx_v_shape; __Pyx_INCREF(__pyx_t_4);
5511 : __pyx_t_1 = 0;
5512 0 : for (;;) {
5513 0 : {
5514 0 : Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4);
5515 : #if !CYTHON_ASSUME_SAFE_MACROS
5516 : if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 159, __pyx_L1_error)
5517 : #endif
5518 0 : if (__pyx_t_1 >= __pyx_temp) break;
5519 : }
5520 : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5521 0 : __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_1); __Pyx_INCREF(__pyx_t_5); __pyx_t_1++; if (unlikely((0 < 0))) __PYX_ERR(1, 159, __pyx_L1_error)
5522 : #else
5523 : __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 159, __pyx_L1_error)
5524 : __Pyx_GOTREF(__pyx_t_5);
5525 : #endif
5526 0 : __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 159, __pyx_L1_error)
5527 0 : __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5528 0 : __pyx_v_dim = __pyx_t_10;
5529 0 : __pyx_v_idx = __pyx_t_9;
5530 0 : __pyx_t_9 = (__pyx_t_9 + 1);
5531 :
5532 : /* "View.MemoryView":160
5533 : *
5534 : * for idx, dim in enumerate(shape):
5535 : * if dim <= 0: # <<<<<<<<<<<<<<
5536 : * raise ValueError, f"Invalid shape in axis {idx}: {dim}."
5537 : * self._shape[idx] = dim
5538 : */
5539 0 : __pyx_t_3 = (__pyx_v_dim <= 0);
5540 0 : if (unlikely(__pyx_t_3)) {
5541 :
5542 : /* "View.MemoryView":161
5543 : * for idx, dim in enumerate(shape):
5544 : * if dim <= 0:
5545 : * raise ValueError, f"Invalid shape in axis {idx}: {dim}." # <<<<<<<<<<<<<<
5546 : * self._shape[idx] = dim
5547 : *
5548 : */
5549 0 : __pyx_t_5 = PyTuple_New(5); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 161, __pyx_L1_error)
5550 0 : __Pyx_GOTREF(__pyx_t_5);
5551 0 : __pyx_t_10 = 0;
5552 0 : __pyx_t_11 = 127;
5553 0 : __Pyx_INCREF(__pyx_kp_u_Invalid_shape_in_axis);
5554 0 : __pyx_t_10 += 22;
5555 0 : __Pyx_GIVEREF(__pyx_kp_u_Invalid_shape_in_axis);
5556 0 : PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_Invalid_shape_in_axis);
5557 0 : __pyx_t_6 = __Pyx_PyUnicode_From_int(__pyx_v_idx, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 161, __pyx_L1_error)
5558 0 : __Pyx_GOTREF(__pyx_t_6);
5559 0 : __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
5560 0 : __Pyx_GIVEREF(__pyx_t_6);
5561 0 : PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_6);
5562 0 : __pyx_t_6 = 0;
5563 0 : __Pyx_INCREF(__pyx_kp_u_);
5564 0 : __pyx_t_10 += 2;
5565 0 : __Pyx_GIVEREF(__pyx_kp_u_);
5566 0 : PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u_);
5567 0 : __pyx_t_6 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_dim, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 161, __pyx_L1_error)
5568 0 : __Pyx_GOTREF(__pyx_t_6);
5569 0 : __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
5570 0 : __Pyx_GIVEREF(__pyx_t_6);
5571 0 : PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_6);
5572 0 : __pyx_t_6 = 0;
5573 0 : __Pyx_INCREF(__pyx_kp_u__2);
5574 0 : __pyx_t_10 += 1;
5575 0 : __Pyx_GIVEREF(__pyx_kp_u__2);
5576 0 : PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_kp_u__2);
5577 0 : __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_5, 5, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 161, __pyx_L1_error)
5578 0 : __Pyx_GOTREF(__pyx_t_6);
5579 0 : __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5580 0 : __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_6, 0, 0);
5581 0 : __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5582 0 : __PYX_ERR(1, 161, __pyx_L1_error)
5583 :
5584 : /* "View.MemoryView":160
5585 : *
5586 : * for idx, dim in enumerate(shape):
5587 : * if dim <= 0: # <<<<<<<<<<<<<<
5588 : * raise ValueError, f"Invalid shape in axis {idx}: {dim}."
5589 : * self._shape[idx] = dim
5590 : */
5591 : }
5592 :
5593 : /* "View.MemoryView":162
5594 : * if dim <= 0:
5595 : * raise ValueError, f"Invalid shape in axis {idx}: {dim}."
5596 : * self._shape[idx] = dim # <<<<<<<<<<<<<<
5597 : *
5598 : * cdef char order
5599 : */
5600 0 : (__pyx_v_self->_shape[__pyx_v_idx]) = __pyx_v_dim;
5601 :
5602 : /* "View.MemoryView":159
5603 : *
5604 : *
5605 : * for idx, dim in enumerate(shape): # <<<<<<<<<<<<<<
5606 : * if dim <= 0:
5607 : * raise ValueError, f"Invalid shape in axis {idx}: {dim}."
5608 : */
5609 : }
5610 0 : __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5611 :
5612 : /* "View.MemoryView":165
5613 : *
5614 : * cdef char order
5615 : * if mode == 'c': # <<<<<<<<<<<<<<
5616 : * order = b'C'
5617 : * self.mode = u'c'
5618 : */
5619 0 : __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_c, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 165, __pyx_L1_error)
5620 0 : if (__pyx_t_3) {
5621 :
5622 : /* "View.MemoryView":166
5623 : * cdef char order
5624 : * if mode == 'c':
5625 : * order = b'C' # <<<<<<<<<<<<<<
5626 : * self.mode = u'c'
5627 : * elif mode == 'fortran':
5628 : */
5629 0 : __pyx_v_order = 'C';
5630 :
5631 : /* "View.MemoryView":167
5632 : * if mode == 'c':
5633 : * order = b'C'
5634 : * self.mode = u'c' # <<<<<<<<<<<<<<
5635 : * elif mode == 'fortran':
5636 : * order = b'F'
5637 : */
5638 0 : __Pyx_INCREF(__pyx_n_u_c);
5639 0 : __Pyx_GIVEREF(__pyx_n_u_c);
5640 0 : __Pyx_GOTREF(__pyx_v_self->mode);
5641 0 : __Pyx_DECREF(__pyx_v_self->mode);
5642 0 : __pyx_v_self->mode = __pyx_n_u_c;
5643 :
5644 : /* "View.MemoryView":165
5645 : *
5646 : * cdef char order
5647 : * if mode == 'c': # <<<<<<<<<<<<<<
5648 : * order = b'C'
5649 : * self.mode = u'c'
5650 : */
5651 0 : goto __pyx_L11;
5652 : }
5653 :
5654 : /* "View.MemoryView":168
5655 : * order = b'C'
5656 : * self.mode = u'c'
5657 : * elif mode == 'fortran': # <<<<<<<<<<<<<<
5658 : * order = b'F'
5659 : * self.mode = u'fortran'
5660 : */
5661 0 : __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_fortran, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 168, __pyx_L1_error)
5662 0 : if (likely(__pyx_t_3)) {
5663 :
5664 : /* "View.MemoryView":169
5665 : * self.mode = u'c'
5666 : * elif mode == 'fortran':
5667 : * order = b'F' # <<<<<<<<<<<<<<
5668 : * self.mode = u'fortran'
5669 : * else:
5670 : */
5671 0 : __pyx_v_order = 'F';
5672 :
5673 : /* "View.MemoryView":170
5674 : * elif mode == 'fortran':
5675 : * order = b'F'
5676 : * self.mode = u'fortran' # <<<<<<<<<<<<<<
5677 : * else:
5678 : * raise ValueError, f"Invalid mode, expected 'c' or 'fortran', got {mode}"
5679 : */
5680 0 : __Pyx_INCREF(__pyx_n_u_fortran);
5681 0 : __Pyx_GIVEREF(__pyx_n_u_fortran);
5682 0 : __Pyx_GOTREF(__pyx_v_self->mode);
5683 0 : __Pyx_DECREF(__pyx_v_self->mode);
5684 0 : __pyx_v_self->mode = __pyx_n_u_fortran;
5685 :
5686 : /* "View.MemoryView":168
5687 : * order = b'C'
5688 : * self.mode = u'c'
5689 : * elif mode == 'fortran': # <<<<<<<<<<<<<<
5690 : * order = b'F'
5691 : * self.mode = u'fortran'
5692 : */
5693 0 : goto __pyx_L11;
5694 : }
5695 :
5696 : /* "View.MemoryView":172
5697 : * self.mode = u'fortran'
5698 : * else:
5699 : * raise ValueError, f"Invalid mode, expected 'c' or 'fortran', got {mode}" # <<<<<<<<<<<<<<
5700 : *
5701 : * self.len = fill_contig_strides_array(self._shape, self._strides, itemsize, self.ndim, order)
5702 : */
5703 : /*else*/ {
5704 0 : __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_mode, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 172, __pyx_L1_error)
5705 0 : __Pyx_GOTREF(__pyx_t_4);
5706 0 : __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Invalid_mode_expected_c_or_fortr, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 172, __pyx_L1_error)
5707 0 : __Pyx_GOTREF(__pyx_t_6);
5708 0 : __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5709 0 : __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_6, 0, 0);
5710 0 : __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5711 0 : __PYX_ERR(1, 172, __pyx_L1_error)
5712 : }
5713 0 : __pyx_L11:;
5714 :
5715 : /* "View.MemoryView":174
5716 : * raise ValueError, f"Invalid mode, expected 'c' or 'fortran', got {mode}"
5717 : *
5718 : * self.len = fill_contig_strides_array(self._shape, self._strides, itemsize, self.ndim, order) # <<<<<<<<<<<<<<
5719 : *
5720 : * self.free_data = allocate_buffer
5721 : */
5722 0 : __pyx_v_self->len = __pyx_fill_contig_strides_array(__pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_itemsize, __pyx_v_self->ndim, __pyx_v_order);
5723 :
5724 : /* "View.MemoryView":176
5725 : * self.len = fill_contig_strides_array(self._shape, self._strides, itemsize, self.ndim, order)
5726 : *
5727 : * self.free_data = allocate_buffer # <<<<<<<<<<<<<<
5728 : * self.dtype_is_object = format == b'O'
5729 : *
5730 : */
5731 0 : __pyx_v_self->free_data = __pyx_v_allocate_buffer;
5732 :
5733 : /* "View.MemoryView":177
5734 : *
5735 : * self.free_data = allocate_buffer
5736 : * self.dtype_is_object = format == b'O' # <<<<<<<<<<<<<<
5737 : *
5738 : * if allocate_buffer:
5739 : */
5740 0 : __pyx_t_6 = PyObject_RichCompare(__pyx_v_format, __pyx_n_b_O, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 177, __pyx_L1_error)
5741 0 : __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 177, __pyx_L1_error)
5742 0 : __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5743 0 : __pyx_v_self->dtype_is_object = __pyx_t_3;
5744 :
5745 : /* "View.MemoryView":179
5746 : * self.dtype_is_object = format == b'O'
5747 : *
5748 : * if allocate_buffer: # <<<<<<<<<<<<<<
5749 : * _allocate_buffer(self)
5750 : *
5751 : */
5752 0 : if (__pyx_v_allocate_buffer) {
5753 :
5754 : /* "View.MemoryView":180
5755 : *
5756 : * if allocate_buffer:
5757 : * _allocate_buffer(self) # <<<<<<<<<<<<<<
5758 : *
5759 : * @cname('getbuffer')
5760 : */
5761 0 : __pyx_t_9 = __pyx_array_allocate_buffer(__pyx_v_self); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 180, __pyx_L1_error)
5762 :
5763 : /* "View.MemoryView":179
5764 : * self.dtype_is_object = format == b'O'
5765 : *
5766 : * if allocate_buffer: # <<<<<<<<<<<<<<
5767 : * _allocate_buffer(self)
5768 : *
5769 : */
5770 : }
5771 :
5772 : /* "View.MemoryView":131
5773 : * cdef bint dtype_is_object
5774 : *
5775 : * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<<
5776 : * mode="c", bint allocate_buffer=True):
5777 : *
5778 : */
5779 :
5780 : /* function exit code */
5781 0 : __pyx_r = 0;
5782 0 : goto __pyx_L0;
5783 0 : __pyx_L1_error:;
5784 0 : __Pyx_XDECREF(__pyx_t_4);
5785 0 : __Pyx_XDECREF(__pyx_t_5);
5786 0 : __Pyx_XDECREF(__pyx_t_6);
5787 0 : __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5788 0 : __pyx_r = -1;
5789 0 : __pyx_L0:;
5790 0 : __Pyx_XDECREF(__pyx_v_format);
5791 0 : __Pyx_RefNannyFinishContext();
5792 0 : return __pyx_r;
5793 : }
5794 :
5795 : /* "View.MemoryView":182
5796 : * _allocate_buffer(self)
5797 : *
5798 : * @cname('getbuffer') # <<<<<<<<<<<<<<
5799 : * def __getbuffer__(self, Py_buffer *info, int flags):
5800 : * cdef int bufmode = -1
5801 : */
5802 :
5803 : /* Python wrapper */
5804 : CYTHON_UNUSED static int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
5805 0 : CYTHON_UNUSED static int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
5806 0 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
5807 0 : int __pyx_r;
5808 : __Pyx_RefNannyDeclarations
5809 0 : __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
5810 0 : __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
5811 0 : __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(((struct __pyx_array_obj *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));
5812 :
5813 : /* function exit code */
5814 0 : __Pyx_RefNannyFinishContext();
5815 0 : return __pyx_r;
5816 : }
5817 :
5818 0 : static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
5819 0 : int __pyx_v_bufmode;
5820 0 : int __pyx_r;
5821 : __Pyx_RefNannyDeclarations
5822 0 : int __pyx_t_1;
5823 0 : char *__pyx_t_2;
5824 0 : Py_ssize_t __pyx_t_3;
5825 0 : int __pyx_t_4;
5826 0 : Py_ssize_t *__pyx_t_5;
5827 0 : int __pyx_lineno = 0;
5828 0 : const char *__pyx_filename = NULL;
5829 0 : int __pyx_clineno = 0;
5830 0 : if (unlikely(__pyx_v_info == NULL)) {
5831 0 : PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
5832 0 : return -1;
5833 : }
5834 0 : __Pyx_RefNannySetupContext("__getbuffer__", 0);
5835 0 : __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
5836 0 : __Pyx_GIVEREF(__pyx_v_info->obj);
5837 :
5838 : /* "View.MemoryView":184
5839 : * @cname('getbuffer')
5840 : * def __getbuffer__(self, Py_buffer *info, int flags):
5841 : * cdef int bufmode = -1 # <<<<<<<<<<<<<<
5842 : * if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS):
5843 : * if self.mode == u"c":
5844 : */
5845 0 : __pyx_v_bufmode = -1;
5846 :
5847 : /* "View.MemoryView":185
5848 : * def __getbuffer__(self, Py_buffer *info, int flags):
5849 : * cdef int bufmode = -1
5850 : * if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS): # <<<<<<<<<<<<<<
5851 : * if self.mode == u"c":
5852 : * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
5853 : */
5854 0 : __pyx_t_1 = ((__pyx_v_flags & ((PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS) | PyBUF_ANY_CONTIGUOUS)) != 0);
5855 0 : if (__pyx_t_1) {
5856 :
5857 : /* "View.MemoryView":186
5858 : * cdef int bufmode = -1
5859 : * if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS):
5860 : * if self.mode == u"c": # <<<<<<<<<<<<<<
5861 : * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
5862 : * elif self.mode == u"fortran":
5863 : */
5864 0 : __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_c, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 186, __pyx_L1_error)
5865 0 : if (__pyx_t_1) {
5866 :
5867 : /* "View.MemoryView":187
5868 : * if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS):
5869 : * if self.mode == u"c":
5870 : * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS # <<<<<<<<<<<<<<
5871 : * elif self.mode == u"fortran":
5872 : * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
5873 : */
5874 0 : __pyx_v_bufmode = (PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);
5875 :
5876 : /* "View.MemoryView":186
5877 : * cdef int bufmode = -1
5878 : * if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS):
5879 : * if self.mode == u"c": # <<<<<<<<<<<<<<
5880 : * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
5881 : * elif self.mode == u"fortran":
5882 : */
5883 0 : goto __pyx_L4;
5884 : }
5885 :
5886 : /* "View.MemoryView":188
5887 : * if self.mode == u"c":
5888 : * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
5889 : * elif self.mode == u"fortran": # <<<<<<<<<<<<<<
5890 : * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
5891 : * if not (flags & bufmode):
5892 : */
5893 0 : __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_fortran, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 188, __pyx_L1_error)
5894 0 : if (__pyx_t_1) {
5895 :
5896 : /* "View.MemoryView":189
5897 : * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
5898 : * elif self.mode == u"fortran":
5899 : * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS # <<<<<<<<<<<<<<
5900 : * if not (flags & bufmode):
5901 : * raise ValueError, "Can only create a buffer that is contiguous in memory."
5902 : */
5903 0 : __pyx_v_bufmode = (PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);
5904 :
5905 : /* "View.MemoryView":188
5906 : * if self.mode == u"c":
5907 : * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
5908 : * elif self.mode == u"fortran": # <<<<<<<<<<<<<<
5909 : * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
5910 : * if not (flags & bufmode):
5911 : */
5912 : }
5913 0 : __pyx_L4:;
5914 :
5915 : /* "View.MemoryView":190
5916 : * elif self.mode == u"fortran":
5917 : * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
5918 : * if not (flags & bufmode): # <<<<<<<<<<<<<<
5919 : * raise ValueError, "Can only create a buffer that is contiguous in memory."
5920 : * info.buf = self.data
5921 : */
5922 0 : __pyx_t_1 = (!((__pyx_v_flags & __pyx_v_bufmode) != 0));
5923 0 : if (unlikely(__pyx_t_1)) {
5924 :
5925 : /* "View.MemoryView":191
5926 : * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
5927 : * if not (flags & bufmode):
5928 : * raise ValueError, "Can only create a buffer that is contiguous in memory." # <<<<<<<<<<<<<<
5929 : * info.buf = self.data
5930 : * info.len = self.len
5931 : */
5932 0 : __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Can_only_create_a_buffer_that_is, 0, 0);
5933 0 : __PYX_ERR(1, 191, __pyx_L1_error)
5934 :
5935 : /* "View.MemoryView":190
5936 : * elif self.mode == u"fortran":
5937 : * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
5938 : * if not (flags & bufmode): # <<<<<<<<<<<<<<
5939 : * raise ValueError, "Can only create a buffer that is contiguous in memory."
5940 : * info.buf = self.data
5941 : */
5942 : }
5943 :
5944 : /* "View.MemoryView":185
5945 : * def __getbuffer__(self, Py_buffer *info, int flags):
5946 : * cdef int bufmode = -1
5947 : * if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS): # <<<<<<<<<<<<<<
5948 : * if self.mode == u"c":
5949 : * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
5950 : */
5951 : }
5952 :
5953 : /* "View.MemoryView":192
5954 : * if not (flags & bufmode):
5955 : * raise ValueError, "Can only create a buffer that is contiguous in memory."
5956 : * info.buf = self.data # <<<<<<<<<<<<<<
5957 : * info.len = self.len
5958 : *
5959 : */
5960 0 : __pyx_t_2 = __pyx_v_self->data;
5961 0 : __pyx_v_info->buf = __pyx_t_2;
5962 :
5963 : /* "View.MemoryView":193
5964 : * raise ValueError, "Can only create a buffer that is contiguous in memory."
5965 : * info.buf = self.data
5966 : * info.len = self.len # <<<<<<<<<<<<<<
5967 : *
5968 : * if flags & PyBUF_STRIDES:
5969 : */
5970 0 : __pyx_t_3 = __pyx_v_self->len;
5971 0 : __pyx_v_info->len = __pyx_t_3;
5972 :
5973 : /* "View.MemoryView":195
5974 : * info.len = self.len
5975 : *
5976 : * if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<<
5977 : * info.ndim = self.ndim
5978 : * info.shape = self._shape
5979 : */
5980 0 : __pyx_t_1 = ((__pyx_v_flags & PyBUF_STRIDES) != 0);
5981 0 : if (__pyx_t_1) {
5982 :
5983 : /* "View.MemoryView":196
5984 : *
5985 : * if flags & PyBUF_STRIDES:
5986 : * info.ndim = self.ndim # <<<<<<<<<<<<<<
5987 : * info.shape = self._shape
5988 : * info.strides = self._strides
5989 : */
5990 0 : __pyx_t_4 = __pyx_v_self->ndim;
5991 0 : __pyx_v_info->ndim = __pyx_t_4;
5992 :
5993 : /* "View.MemoryView":197
5994 : * if flags & PyBUF_STRIDES:
5995 : * info.ndim = self.ndim
5996 : * info.shape = self._shape # <<<<<<<<<<<<<<
5997 : * info.strides = self._strides
5998 : * else:
5999 : */
6000 0 : __pyx_t_5 = __pyx_v_self->_shape;
6001 0 : __pyx_v_info->shape = __pyx_t_5;
6002 :
6003 : /* "View.MemoryView":198
6004 : * info.ndim = self.ndim
6005 : * info.shape = self._shape
6006 : * info.strides = self._strides # <<<<<<<<<<<<<<
6007 : * else:
6008 : * info.ndim = 1
6009 : */
6010 0 : __pyx_t_5 = __pyx_v_self->_strides;
6011 0 : __pyx_v_info->strides = __pyx_t_5;
6012 :
6013 : /* "View.MemoryView":195
6014 : * info.len = self.len
6015 : *
6016 : * if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<<
6017 : * info.ndim = self.ndim
6018 : * info.shape = self._shape
6019 : */
6020 0 : goto __pyx_L6;
6021 : }
6022 :
6023 : /* "View.MemoryView":200
6024 : * info.strides = self._strides
6025 : * else:
6026 : * info.ndim = 1 # <<<<<<<<<<<<<<
6027 : * info.shape = &self.len if flags & PyBUF_ND else NULL
6028 : * info.strides = NULL
6029 : */
6030 : /*else*/ {
6031 0 : __pyx_v_info->ndim = 1;
6032 :
6033 : /* "View.MemoryView":201
6034 : * else:
6035 : * info.ndim = 1
6036 : * info.shape = &self.len if flags & PyBUF_ND else NULL # <<<<<<<<<<<<<<
6037 : * info.strides = NULL
6038 : *
6039 : */
6040 0 : __pyx_t_1 = ((__pyx_v_flags & PyBUF_ND) != 0);
6041 0 : if (__pyx_t_1) {
6042 : __pyx_t_5 = (&__pyx_v_self->len);
6043 : } else {
6044 : __pyx_t_5 = NULL;
6045 : }
6046 0 : __pyx_v_info->shape = __pyx_t_5;
6047 :
6048 : /* "View.MemoryView":202
6049 : * info.ndim = 1
6050 : * info.shape = &self.len if flags & PyBUF_ND else NULL
6051 : * info.strides = NULL # <<<<<<<<<<<<<<
6052 : *
6053 : * info.suboffsets = NULL
6054 : */
6055 0 : __pyx_v_info->strides = NULL;
6056 : }
6057 0 : __pyx_L6:;
6058 :
6059 : /* "View.MemoryView":204
6060 : * info.strides = NULL
6061 : *
6062 : * info.suboffsets = NULL # <<<<<<<<<<<<<<
6063 : * info.itemsize = self.itemsize
6064 : * info.readonly = 0
6065 : */
6066 0 : __pyx_v_info->suboffsets = NULL;
6067 :
6068 : /* "View.MemoryView":205
6069 : *
6070 : * info.suboffsets = NULL
6071 : * info.itemsize = self.itemsize # <<<<<<<<<<<<<<
6072 : * info.readonly = 0
6073 : * info.format = self.format if flags & PyBUF_FORMAT else NULL
6074 : */
6075 0 : __pyx_t_3 = __pyx_v_self->itemsize;
6076 0 : __pyx_v_info->itemsize = __pyx_t_3;
6077 :
6078 : /* "View.MemoryView":206
6079 : * info.suboffsets = NULL
6080 : * info.itemsize = self.itemsize
6081 : * info.readonly = 0 # <<<<<<<<<<<<<<
6082 : * info.format = self.format if flags & PyBUF_FORMAT else NULL
6083 : * info.obj = self
6084 : */
6085 0 : __pyx_v_info->readonly = 0;
6086 :
6087 : /* "View.MemoryView":207
6088 : * info.itemsize = self.itemsize
6089 : * info.readonly = 0
6090 : * info.format = self.format if flags & PyBUF_FORMAT else NULL # <<<<<<<<<<<<<<
6091 : * info.obj = self
6092 : *
6093 : */
6094 0 : __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
6095 0 : if (__pyx_t_1) {
6096 0 : __pyx_t_2 = __pyx_v_self->format;
6097 : } else {
6098 : __pyx_t_2 = NULL;
6099 : }
6100 0 : __pyx_v_info->format = __pyx_t_2;
6101 :
6102 : /* "View.MemoryView":208
6103 : * info.readonly = 0
6104 : * info.format = self.format if flags & PyBUF_FORMAT else NULL
6105 : * info.obj = self # <<<<<<<<<<<<<<
6106 : *
6107 : * def __dealloc__(array self):
6108 : */
6109 0 : __Pyx_INCREF((PyObject *)__pyx_v_self);
6110 0 : __Pyx_GIVEREF((PyObject *)__pyx_v_self);
6111 0 : __Pyx_GOTREF(__pyx_v_info->obj);
6112 0 : __Pyx_DECREF(__pyx_v_info->obj);
6113 0 : __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
6114 :
6115 : /* "View.MemoryView":182
6116 : * _allocate_buffer(self)
6117 : *
6118 : * @cname('getbuffer') # <<<<<<<<<<<<<<
6119 : * def __getbuffer__(self, Py_buffer *info, int flags):
6120 : * cdef int bufmode = -1
6121 : */
6122 :
6123 : /* function exit code */
6124 0 : __pyx_r = 0;
6125 0 : goto __pyx_L0;
6126 0 : __pyx_L1_error:;
6127 0 : __Pyx_AddTraceback("View.MemoryView.array.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6128 0 : __pyx_r = -1;
6129 0 : if (__pyx_v_info->obj != NULL) {
6130 0 : __Pyx_GOTREF(__pyx_v_info->obj);
6131 0 : __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
6132 : }
6133 0 : goto __pyx_L2;
6134 0 : __pyx_L0:;
6135 0 : if (__pyx_v_info->obj == Py_None) {
6136 0 : __Pyx_GOTREF(__pyx_v_info->obj);
6137 0 : __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
6138 : }
6139 0 : __pyx_L2:;
6140 : __Pyx_RefNannyFinishContext();
6141 : return __pyx_r;
6142 : }
6143 :
6144 : /* "View.MemoryView":210
6145 : * info.obj = self
6146 : *
6147 : * def __dealloc__(array self): # <<<<<<<<<<<<<<
6148 : * if self.callback_free_data != NULL:
6149 : * self.callback_free_data(self.data)
6150 : */
6151 :
6152 : /* Python wrapper */
6153 : static void __pyx_array___dealloc__(PyObject *__pyx_v_self); /*proto*/
6154 0 : static void __pyx_array___dealloc__(PyObject *__pyx_v_self) {
6155 0 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
6156 : __Pyx_RefNannyDeclarations
6157 0 : __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
6158 0 : __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
6159 0 : __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(((struct __pyx_array_obj *)__pyx_v_self));
6160 :
6161 : /* function exit code */
6162 0 : __Pyx_RefNannyFinishContext();
6163 : }
6164 :
6165 0 : static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self) {
6166 0 : int __pyx_t_1;
6167 0 : int __pyx_t_2;
6168 :
6169 : /* "View.MemoryView":211
6170 : *
6171 : * def __dealloc__(array self):
6172 : * if self.callback_free_data != NULL: # <<<<<<<<<<<<<<
6173 : * self.callback_free_data(self.data)
6174 : * elif self.free_data and self.data is not NULL:
6175 : */
6176 0 : __pyx_t_1 = (__pyx_v_self->callback_free_data != NULL);
6177 0 : if (__pyx_t_1) {
6178 :
6179 : /* "View.MemoryView":212
6180 : * def __dealloc__(array self):
6181 : * if self.callback_free_data != NULL:
6182 : * self.callback_free_data(self.data) # <<<<<<<<<<<<<<
6183 : * elif self.free_data and self.data is not NULL:
6184 : * if self.dtype_is_object:
6185 : */
6186 0 : __pyx_v_self->callback_free_data(__pyx_v_self->data);
6187 :
6188 : /* "View.MemoryView":211
6189 : *
6190 : * def __dealloc__(array self):
6191 : * if self.callback_free_data != NULL: # <<<<<<<<<<<<<<
6192 : * self.callback_free_data(self.data)
6193 : * elif self.free_data and self.data is not NULL:
6194 : */
6195 0 : goto __pyx_L3;
6196 : }
6197 :
6198 : /* "View.MemoryView":213
6199 : * if self.callback_free_data != NULL:
6200 : * self.callback_free_data(self.data)
6201 : * elif self.free_data and self.data is not NULL: # <<<<<<<<<<<<<<
6202 : * if self.dtype_is_object:
6203 : * refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)
6204 : */
6205 0 : if (__pyx_v_self->free_data) {
6206 0 : } else {
6207 0 : __pyx_t_1 = __pyx_v_self->free_data;
6208 0 : goto __pyx_L4_bool_binop_done;
6209 : }
6210 0 : __pyx_t_2 = (__pyx_v_self->data != NULL);
6211 0 : __pyx_t_1 = __pyx_t_2;
6212 0 : __pyx_L4_bool_binop_done:;
6213 0 : if (__pyx_t_1) {
6214 :
6215 : /* "View.MemoryView":214
6216 : * self.callback_free_data(self.data)
6217 : * elif self.free_data and self.data is not NULL:
6218 : * if self.dtype_is_object: # <<<<<<<<<<<<<<
6219 : * refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)
6220 : * free(self.data)
6221 : */
6222 0 : if (__pyx_v_self->dtype_is_object) {
6223 :
6224 : /* "View.MemoryView":215
6225 : * elif self.free_data and self.data is not NULL:
6226 : * if self.dtype_is_object:
6227 : * refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False) # <<<<<<<<<<<<<<
6228 : * free(self.data)
6229 : * PyObject_Free(self._shape)
6230 : */
6231 0 : __pyx_memoryview_refcount_objects_in_slice(__pyx_v_self->data, __pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_self->ndim, 0);
6232 :
6233 : /* "View.MemoryView":214
6234 : * self.callback_free_data(self.data)
6235 : * elif self.free_data and self.data is not NULL:
6236 : * if self.dtype_is_object: # <<<<<<<<<<<<<<
6237 : * refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)
6238 : * free(self.data)
6239 : */
6240 : }
6241 :
6242 : /* "View.MemoryView":216
6243 : * if self.dtype_is_object:
6244 : * refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)
6245 : * free(self.data) # <<<<<<<<<<<<<<
6246 : * PyObject_Free(self._shape)
6247 : *
6248 : */
6249 0 : free(__pyx_v_self->data);
6250 :
6251 : /* "View.MemoryView":213
6252 : * if self.callback_free_data != NULL:
6253 : * self.callback_free_data(self.data)
6254 : * elif self.free_data and self.data is not NULL: # <<<<<<<<<<<<<<
6255 : * if self.dtype_is_object:
6256 : * refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)
6257 : */
6258 : }
6259 0 : __pyx_L3:;
6260 :
6261 : /* "View.MemoryView":217
6262 : * refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)
6263 : * free(self.data)
6264 : * PyObject_Free(self._shape) # <<<<<<<<<<<<<<
6265 : *
6266 : * @property
6267 : */
6268 0 : PyObject_Free(__pyx_v_self->_shape);
6269 :
6270 : /* "View.MemoryView":210
6271 : * info.obj = self
6272 : *
6273 : * def __dealloc__(array self): # <<<<<<<<<<<<<<
6274 : * if self.callback_free_data != NULL:
6275 : * self.callback_free_data(self.data)
6276 : */
6277 :
6278 : /* function exit code */
6279 0 : }
6280 :
6281 : /* "View.MemoryView":219
6282 : * PyObject_Free(self._shape)
6283 : *
6284 : * @property # <<<<<<<<<<<<<<
6285 : * def memview(self):
6286 : * return self.get_memview()
6287 : */
6288 :
6289 : /* Python wrapper */
6290 : static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self); /*proto*/
6291 0 : static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self) {
6292 0 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
6293 0 : PyObject *__pyx_r = 0;
6294 : __Pyx_RefNannyDeclarations
6295 0 : __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6296 0 : __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
6297 0 : __pyx_r = __pyx_pf_15View_dot_MemoryView_5array_7memview___get__(((struct __pyx_array_obj *)__pyx_v_self));
6298 :
6299 : /* function exit code */
6300 0 : __Pyx_RefNannyFinishContext();
6301 0 : return __pyx_r;
6302 : }
6303 :
6304 0 : static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self) {
6305 0 : PyObject *__pyx_r = NULL;
6306 : __Pyx_RefNannyDeclarations
6307 0 : PyObject *__pyx_t_1 = NULL;
6308 0 : int __pyx_lineno = 0;
6309 0 : const char *__pyx_filename = NULL;
6310 0 : int __pyx_clineno = 0;
6311 0 : __Pyx_RefNannySetupContext("__get__", 1);
6312 :
6313 : /* "View.MemoryView":221
6314 : * @property
6315 : * def memview(self):
6316 : * return self.get_memview() # <<<<<<<<<<<<<<
6317 : *
6318 : * @cname('get_memview')
6319 : */
6320 0 : __Pyx_XDECREF(__pyx_r);
6321 0 : __pyx_t_1 = ((struct __pyx_vtabstruct_array *)__pyx_v_self->__pyx_vtab)->get_memview(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 221, __pyx_L1_error)
6322 0 : __Pyx_GOTREF(__pyx_t_1);
6323 0 : __pyx_r = __pyx_t_1;
6324 0 : __pyx_t_1 = 0;
6325 0 : goto __pyx_L0;
6326 :
6327 : /* "View.MemoryView":219
6328 : * PyObject_Free(self._shape)
6329 : *
6330 : * @property # <<<<<<<<<<<<<<
6331 : * def memview(self):
6332 : * return self.get_memview()
6333 : */
6334 :
6335 : /* function exit code */
6336 0 : __pyx_L1_error:;
6337 0 : __Pyx_XDECREF(__pyx_t_1);
6338 0 : __Pyx_AddTraceback("View.MemoryView.array.memview.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6339 0 : __pyx_r = NULL;
6340 0 : __pyx_L0:;
6341 0 : __Pyx_XGIVEREF(__pyx_r);
6342 0 : __Pyx_RefNannyFinishContext();
6343 0 : return __pyx_r;
6344 : }
6345 :
6346 : /* "View.MemoryView":224
6347 : *
6348 : * @cname('get_memview')
6349 : * cdef get_memview(self): # <<<<<<<<<<<<<<
6350 : * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
6351 : * return memoryview(self, flags, self.dtype_is_object)
6352 : */
6353 :
6354 0 : static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self) {
6355 0 : int __pyx_v_flags;
6356 0 : PyObject *__pyx_r = NULL;
6357 : __Pyx_RefNannyDeclarations
6358 0 : PyObject *__pyx_t_1 = NULL;
6359 0 : PyObject *__pyx_t_2 = NULL;
6360 0 : PyObject *__pyx_t_3 = NULL;
6361 0 : int __pyx_lineno = 0;
6362 0 : const char *__pyx_filename = NULL;
6363 0 : int __pyx_clineno = 0;
6364 0 : __Pyx_RefNannySetupContext("get_memview", 1);
6365 :
6366 : /* "View.MemoryView":225
6367 : * @cname('get_memview')
6368 : * cdef get_memview(self):
6369 : * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE # <<<<<<<<<<<<<<
6370 : * return memoryview(self, flags, self.dtype_is_object)
6371 : *
6372 : */
6373 0 : __pyx_v_flags = ((PyBUF_ANY_CONTIGUOUS | PyBUF_FORMAT) | PyBUF_WRITABLE);
6374 :
6375 : /* "View.MemoryView":226
6376 : * cdef get_memview(self):
6377 : * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
6378 : * return memoryview(self, flags, self.dtype_is_object) # <<<<<<<<<<<<<<
6379 : *
6380 : * def __len__(self):
6381 : */
6382 0 : __Pyx_XDECREF(__pyx_r);
6383 0 : __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 226, __pyx_L1_error)
6384 0 : __Pyx_GOTREF(__pyx_t_1);
6385 0 : __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 226, __pyx_L1_error)
6386 0 : __Pyx_GOTREF(__pyx_t_2);
6387 0 : __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 226, __pyx_L1_error)
6388 0 : __Pyx_GOTREF(__pyx_t_3);
6389 0 : __Pyx_INCREF((PyObject *)__pyx_v_self);
6390 0 : __Pyx_GIVEREF((PyObject *)__pyx_v_self);
6391 0 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self))) __PYX_ERR(1, 226, __pyx_L1_error);
6392 0 : __Pyx_GIVEREF(__pyx_t_1);
6393 0 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(1, 226, __pyx_L1_error);
6394 0 : __Pyx_GIVEREF(__pyx_t_2);
6395 0 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2)) __PYX_ERR(1, 226, __pyx_L1_error);
6396 0 : __pyx_t_1 = 0;
6397 0 : __pyx_t_2 = 0;
6398 0 : __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 226, __pyx_L1_error)
6399 0 : __Pyx_GOTREF(__pyx_t_2);
6400 0 : __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6401 0 : __pyx_r = __pyx_t_2;
6402 0 : __pyx_t_2 = 0;
6403 0 : goto __pyx_L0;
6404 :
6405 : /* "View.MemoryView":224
6406 : *
6407 : * @cname('get_memview')
6408 : * cdef get_memview(self): # <<<<<<<<<<<<<<
6409 : * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
6410 : * return memoryview(self, flags, self.dtype_is_object)
6411 : */
6412 :
6413 : /* function exit code */
6414 0 : __pyx_L1_error:;
6415 0 : __Pyx_XDECREF(__pyx_t_1);
6416 0 : __Pyx_XDECREF(__pyx_t_2);
6417 0 : __Pyx_XDECREF(__pyx_t_3);
6418 0 : __Pyx_AddTraceback("View.MemoryView.array.get_memview", __pyx_clineno, __pyx_lineno, __pyx_filename);
6419 0 : __pyx_r = 0;
6420 0 : __pyx_L0:;
6421 0 : __Pyx_XGIVEREF(__pyx_r);
6422 0 : __Pyx_RefNannyFinishContext();
6423 0 : return __pyx_r;
6424 : }
6425 :
6426 : /* "View.MemoryView":228
6427 : * return memoryview(self, flags, self.dtype_is_object)
6428 : *
6429 : * def __len__(self): # <<<<<<<<<<<<<<
6430 : * return self._shape[0]
6431 : *
6432 : */
6433 :
6434 : /* Python wrapper */
6435 : static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self); /*proto*/
6436 0 : static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self) {
6437 0 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
6438 0 : Py_ssize_t __pyx_r;
6439 : __Pyx_RefNannyDeclarations
6440 0 : __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
6441 0 : __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
6442 0 : __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(((struct __pyx_array_obj *)__pyx_v_self));
6443 :
6444 : /* function exit code */
6445 0 : __Pyx_RefNannyFinishContext();
6446 0 : return __pyx_r;
6447 : }
6448 :
6449 0 : static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self) {
6450 0 : Py_ssize_t __pyx_r;
6451 :
6452 : /* "View.MemoryView":229
6453 : *
6454 : * def __len__(self):
6455 : * return self._shape[0] # <<<<<<<<<<<<<<
6456 : *
6457 : * def __getattr__(self, attr):
6458 : */
6459 0 : __pyx_r = (__pyx_v_self->_shape[0]);
6460 0 : goto __pyx_L0;
6461 :
6462 : /* "View.MemoryView":228
6463 : * return memoryview(self, flags, self.dtype_is_object)
6464 : *
6465 : * def __len__(self): # <<<<<<<<<<<<<<
6466 : * return self._shape[0]
6467 : *
6468 : */
6469 :
6470 : /* function exit code */
6471 0 : __pyx_L0:;
6472 0 : return __pyx_r;
6473 : }
6474 :
6475 : /* "View.MemoryView":231
6476 : * return self._shape[0]
6477 : *
6478 : * def __getattr__(self, attr): # <<<<<<<<<<<<<<
6479 : * return getattr(self.memview, attr)
6480 : *
6481 : */
6482 :
6483 : /* Python wrapper */
6484 : static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr); /*proto*/
6485 0 : static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr) {
6486 0 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
6487 0 : PyObject *__pyx_r = 0;
6488 : __Pyx_RefNannyDeclarations
6489 0 : __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
6490 0 : __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
6491 0 : __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_attr));
6492 :
6493 : /* function exit code */
6494 0 : __Pyx_RefNannyFinishContext();
6495 0 : return __pyx_r;
6496 : }
6497 :
6498 0 : static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr) {
6499 0 : PyObject *__pyx_r = NULL;
6500 : __Pyx_RefNannyDeclarations
6501 0 : PyObject *__pyx_t_1 = NULL;
6502 0 : PyObject *__pyx_t_2 = NULL;
6503 0 : int __pyx_lineno = 0;
6504 0 : const char *__pyx_filename = NULL;
6505 0 : int __pyx_clineno = 0;
6506 0 : __Pyx_RefNannySetupContext("__getattr__", 1);
6507 :
6508 : /* "View.MemoryView":232
6509 : *
6510 : * def __getattr__(self, attr):
6511 : * return getattr(self.memview, attr) # <<<<<<<<<<<<<<
6512 : *
6513 : * def __getitem__(self, item):
6514 : */
6515 0 : __Pyx_XDECREF(__pyx_r);
6516 0 : __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 232, __pyx_L1_error)
6517 0 : __Pyx_GOTREF(__pyx_t_1);
6518 0 : __pyx_t_2 = __Pyx_GetAttr(__pyx_t_1, __pyx_v_attr); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 232, __pyx_L1_error)
6519 0 : __Pyx_GOTREF(__pyx_t_2);
6520 0 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6521 0 : __pyx_r = __pyx_t_2;
6522 0 : __pyx_t_2 = 0;
6523 0 : goto __pyx_L0;
6524 :
6525 : /* "View.MemoryView":231
6526 : * return self._shape[0]
6527 : *
6528 : * def __getattr__(self, attr): # <<<<<<<<<<<<<<
6529 : * return getattr(self.memview, attr)
6530 : *
6531 : */
6532 :
6533 : /* function exit code */
6534 0 : __pyx_L1_error:;
6535 0 : __Pyx_XDECREF(__pyx_t_1);
6536 0 : __Pyx_XDECREF(__pyx_t_2);
6537 0 : __Pyx_AddTraceback("View.MemoryView.array.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6538 0 : __pyx_r = NULL;
6539 0 : __pyx_L0:;
6540 0 : __Pyx_XGIVEREF(__pyx_r);
6541 0 : __Pyx_RefNannyFinishContext();
6542 0 : return __pyx_r;
6543 : }
6544 :
6545 : /* "View.MemoryView":234
6546 : * return getattr(self.memview, attr)
6547 : *
6548 : * def __getitem__(self, item): # <<<<<<<<<<<<<<
6549 : * return self.memview[item]
6550 : *
6551 : */
6552 :
6553 : /* Python wrapper */
6554 : static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/
6555 0 : static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item) {
6556 0 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
6557 0 : PyObject *__pyx_r = 0;
6558 : __Pyx_RefNannyDeclarations
6559 0 : __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
6560 0 : __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
6561 0 : __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item));
6562 :
6563 : /* function exit code */
6564 0 : __Pyx_RefNannyFinishContext();
6565 0 : return __pyx_r;
6566 : }
6567 :
6568 0 : static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item) {
6569 0 : PyObject *__pyx_r = NULL;
6570 : __Pyx_RefNannyDeclarations
6571 0 : PyObject *__pyx_t_1 = NULL;
6572 0 : PyObject *__pyx_t_2 = NULL;
6573 0 : int __pyx_lineno = 0;
6574 0 : const char *__pyx_filename = NULL;
6575 0 : int __pyx_clineno = 0;
6576 0 : __Pyx_RefNannySetupContext("__getitem__", 1);
6577 :
6578 : /* "View.MemoryView":235
6579 : *
6580 : * def __getitem__(self, item):
6581 : * return self.memview[item] # <<<<<<<<<<<<<<
6582 : *
6583 : * def __setitem__(self, item, value):
6584 : */
6585 0 : __Pyx_XDECREF(__pyx_r);
6586 0 : __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 235, __pyx_L1_error)
6587 0 : __Pyx_GOTREF(__pyx_t_1);
6588 0 : __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_item); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 235, __pyx_L1_error)
6589 0 : __Pyx_GOTREF(__pyx_t_2);
6590 0 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6591 0 : __pyx_r = __pyx_t_2;
6592 0 : __pyx_t_2 = 0;
6593 0 : goto __pyx_L0;
6594 :
6595 : /* "View.MemoryView":234
6596 : * return getattr(self.memview, attr)
6597 : *
6598 : * def __getitem__(self, item): # <<<<<<<<<<<<<<
6599 : * return self.memview[item]
6600 : *
6601 : */
6602 :
6603 : /* function exit code */
6604 0 : __pyx_L1_error:;
6605 0 : __Pyx_XDECREF(__pyx_t_1);
6606 0 : __Pyx_XDECREF(__pyx_t_2);
6607 0 : __Pyx_AddTraceback("View.MemoryView.array.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6608 0 : __pyx_r = NULL;
6609 0 : __pyx_L0:;
6610 0 : __Pyx_XGIVEREF(__pyx_r);
6611 0 : __Pyx_RefNannyFinishContext();
6612 0 : return __pyx_r;
6613 : }
6614 :
6615 : /* "View.MemoryView":237
6616 : * return self.memview[item]
6617 : *
6618 : * def __setitem__(self, item, value): # <<<<<<<<<<<<<<
6619 : * self.memview[item] = value
6620 : *
6621 : */
6622 :
6623 : /* Python wrapper */
6624 : static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /*proto*/
6625 0 : static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) {
6626 0 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
6627 0 : int __pyx_r;
6628 : __Pyx_RefNannyDeclarations
6629 0 : __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
6630 0 : __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
6631 0 : __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item), ((PyObject *)__pyx_v_value));
6632 :
6633 : /* function exit code */
6634 0 : __Pyx_RefNannyFinishContext();
6635 0 : return __pyx_r;
6636 : }
6637 :
6638 0 : static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) {
6639 0 : int __pyx_r;
6640 : __Pyx_RefNannyDeclarations
6641 0 : PyObject *__pyx_t_1 = NULL;
6642 0 : int __pyx_lineno = 0;
6643 0 : const char *__pyx_filename = NULL;
6644 0 : int __pyx_clineno = 0;
6645 0 : __Pyx_RefNannySetupContext("__setitem__", 1);
6646 :
6647 : /* "View.MemoryView":238
6648 : *
6649 : * def __setitem__(self, item, value):
6650 : * self.memview[item] = value # <<<<<<<<<<<<<<
6651 : *
6652 : *
6653 : */
6654 0 : __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 238, __pyx_L1_error)
6655 0 : __Pyx_GOTREF(__pyx_t_1);
6656 0 : if (unlikely((PyObject_SetItem(__pyx_t_1, __pyx_v_item, __pyx_v_value) < 0))) __PYX_ERR(1, 238, __pyx_L1_error)
6657 0 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6658 :
6659 : /* "View.MemoryView":237
6660 : * return self.memview[item]
6661 : *
6662 : * def __setitem__(self, item, value): # <<<<<<<<<<<<<<
6663 : * self.memview[item] = value
6664 : *
6665 : */
6666 :
6667 : /* function exit code */
6668 0 : __pyx_r = 0;
6669 0 : goto __pyx_L0;
6670 0 : __pyx_L1_error:;
6671 0 : __Pyx_XDECREF(__pyx_t_1);
6672 0 : __Pyx_AddTraceback("View.MemoryView.array.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6673 0 : __pyx_r = -1;
6674 0 : __pyx_L0:;
6675 0 : __Pyx_RefNannyFinishContext();
6676 0 : return __pyx_r;
6677 : }
6678 :
6679 : /* "(tree fragment)":1
6680 : * def __reduce_cython__(self): # <<<<<<<<<<<<<<
6681 : * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
6682 : * def __setstate_cython__(self, __pyx_state):
6683 : */
6684 :
6685 : /* Python wrapper */
6686 : static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self,
6687 : #if CYTHON_METH_FASTCALL
6688 : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
6689 : #else
6690 : PyObject *__pyx_args, PyObject *__pyx_kwds
6691 : #endif
6692 : ); /*proto*/
6693 0 : static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self,
6694 : #if CYTHON_METH_FASTCALL
6695 : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
6696 : #else
6697 : PyObject *__pyx_args, PyObject *__pyx_kwds
6698 : #endif
6699 : ) {
6700 : #if !CYTHON_METH_FASTCALL
6701 : CYTHON_UNUSED Py_ssize_t __pyx_nargs;
6702 : #endif
6703 0 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
6704 0 : PyObject *__pyx_r = 0;
6705 : __Pyx_RefNannyDeclarations
6706 0 : __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
6707 : #if !CYTHON_METH_FASTCALL
6708 : #if CYTHON_ASSUME_SAFE_MACROS
6709 : __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
6710 : #else
6711 : __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
6712 : #endif
6713 : #endif
6714 0 : __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
6715 0 : if (unlikely(__pyx_nargs > 0)) {
6716 0 : __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
6717 0 : if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
6718 0 : __pyx_r = __pyx_pf___pyx_array___reduce_cython__(((struct __pyx_array_obj *)__pyx_v_self));
6719 :
6720 : /* function exit code */
6721 0 : __Pyx_RefNannyFinishContext();
6722 0 : return __pyx_r;
6723 : }
6724 :
6725 0 : static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self) {
6726 0 : PyObject *__pyx_r = NULL;
6727 : __Pyx_RefNannyDeclarations
6728 0 : int __pyx_lineno = 0;
6729 0 : const char *__pyx_filename = NULL;
6730 0 : int __pyx_clineno = 0;
6731 0 : __Pyx_RefNannySetupContext("__reduce_cython__", 1);
6732 :
6733 : /* "(tree fragment)":2
6734 : * def __reduce_cython__(self):
6735 : * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<<
6736 : * def __setstate_cython__(self, __pyx_state):
6737 : * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
6738 : */
6739 0 : __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
6740 0 : __PYX_ERR(1, 2, __pyx_L1_error)
6741 :
6742 : /* "(tree fragment)":1
6743 : * def __reduce_cython__(self): # <<<<<<<<<<<<<<
6744 : * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
6745 : * def __setstate_cython__(self, __pyx_state):
6746 : */
6747 :
6748 : /* function exit code */
6749 0 : __pyx_L1_error:;
6750 0 : __Pyx_AddTraceback("View.MemoryView.array.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6751 0 : __pyx_r = NULL;
6752 0 : __Pyx_XGIVEREF(__pyx_r);
6753 0 : __Pyx_RefNannyFinishContext();
6754 0 : return __pyx_r;
6755 : }
6756 :
6757 : /* "(tree fragment)":3
6758 : * def __reduce_cython__(self):
6759 : * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
6760 : * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
6761 : * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
6762 : */
6763 :
6764 : /* Python wrapper */
6765 : static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self,
6766 : #if CYTHON_METH_FASTCALL
6767 : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
6768 : #else
6769 : PyObject *__pyx_args, PyObject *__pyx_kwds
6770 : #endif
6771 : ); /*proto*/
6772 0 : static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self,
6773 : #if CYTHON_METH_FASTCALL
6774 : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
6775 : #else
6776 : PyObject *__pyx_args, PyObject *__pyx_kwds
6777 : #endif
6778 : ) {
6779 0 : CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
6780 : #if !CYTHON_METH_FASTCALL
6781 : CYTHON_UNUSED Py_ssize_t __pyx_nargs;
6782 : #endif
6783 0 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
6784 0 : PyObject* values[1] = {0};
6785 0 : int __pyx_lineno = 0;
6786 0 : const char *__pyx_filename = NULL;
6787 0 : int __pyx_clineno = 0;
6788 0 : PyObject *__pyx_r = 0;
6789 : __Pyx_RefNannyDeclarations
6790 0 : __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
6791 : #if !CYTHON_METH_FASTCALL
6792 : #if CYTHON_ASSUME_SAFE_MACROS
6793 : __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
6794 : #else
6795 : __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
6796 : #endif
6797 : #endif
6798 0 : __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
6799 : {
6800 0 : PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
6801 0 : if (__pyx_kwds) {
6802 0 : Py_ssize_t kw_args;
6803 0 : switch (__pyx_nargs) {
6804 0 : case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
6805 0 : CYTHON_FALLTHROUGH;
6806 0 : case 0: break;
6807 0 : default: goto __pyx_L5_argtuple_error;
6808 : }
6809 0 : kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
6810 0 : switch (__pyx_nargs) {
6811 : case 0:
6812 0 : if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
6813 0 : (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
6814 0 : kw_args--;
6815 : }
6816 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
6817 0 : else goto __pyx_L5_argtuple_error;
6818 : }
6819 0 : if (unlikely(kw_args > 0)) {
6820 0 : const Py_ssize_t kwd_pos_args = __pyx_nargs;
6821 0 : if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
6822 : }
6823 0 : } else if (unlikely(__pyx_nargs != 1)) {
6824 0 : goto __pyx_L5_argtuple_error;
6825 : } else {
6826 0 : values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
6827 : }
6828 0 : __pyx_v___pyx_state = values[0];
6829 : }
6830 0 : goto __pyx_L6_skip;
6831 0 : __pyx_L5_argtuple_error:;
6832 0 : __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
6833 0 : __pyx_L6_skip:;
6834 0 : goto __pyx_L4_argument_unpacking_done;
6835 0 : __pyx_L3_error:;
6836 : {
6837 0 : Py_ssize_t __pyx_temp;
6838 0 : for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
6839 : __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
6840 : }
6841 : }
6842 0 : __Pyx_AddTraceback("View.MemoryView.array.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6843 0 : __Pyx_RefNannyFinishContext();
6844 0 : return NULL;
6845 0 : __pyx_L4_argument_unpacking_done:;
6846 0 : __pyx_r = __pyx_pf___pyx_array_2__setstate_cython__(((struct __pyx_array_obj *)__pyx_v_self), __pyx_v___pyx_state);
6847 :
6848 : /* function exit code */
6849 : {
6850 0 : Py_ssize_t __pyx_temp;
6851 0 : for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
6852 : __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
6853 : }
6854 : }
6855 : __Pyx_RefNannyFinishContext();
6856 : return __pyx_r;
6857 : }
6858 :
6859 0 : static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
6860 0 : PyObject *__pyx_r = NULL;
6861 : __Pyx_RefNannyDeclarations
6862 0 : int __pyx_lineno = 0;
6863 0 : const char *__pyx_filename = NULL;
6864 0 : int __pyx_clineno = 0;
6865 0 : __Pyx_RefNannySetupContext("__setstate_cython__", 1);
6866 :
6867 : /* "(tree fragment)":4
6868 : * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
6869 : * def __setstate_cython__(self, __pyx_state):
6870 : * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<<
6871 : */
6872 0 : __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
6873 0 : __PYX_ERR(1, 4, __pyx_L1_error)
6874 :
6875 : /* "(tree fragment)":3
6876 : * def __reduce_cython__(self):
6877 : * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
6878 : * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
6879 : * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
6880 : */
6881 :
6882 : /* function exit code */
6883 0 : __pyx_L1_error:;
6884 0 : __Pyx_AddTraceback("View.MemoryView.array.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6885 0 : __pyx_r = NULL;
6886 0 : __Pyx_XGIVEREF(__pyx_r);
6887 0 : __Pyx_RefNannyFinishContext();
6888 0 : return __pyx_r;
6889 : }
6890 :
6891 : /* "View.MemoryView":248
6892 : *
6893 : * @cname("__pyx_array_allocate_buffer")
6894 : * cdef int _allocate_buffer(array self) except -1: # <<<<<<<<<<<<<<
6895 : *
6896 : *
6897 : */
6898 :
6899 0 : static int __pyx_array_allocate_buffer(struct __pyx_array_obj *__pyx_v_self) {
6900 0 : Py_ssize_t __pyx_v_i;
6901 0 : PyObject **__pyx_v_p;
6902 0 : int __pyx_r;
6903 0 : int __pyx_t_1;
6904 0 : Py_ssize_t __pyx_t_2;
6905 0 : Py_ssize_t __pyx_t_3;
6906 0 : Py_ssize_t __pyx_t_4;
6907 0 : int __pyx_lineno = 0;
6908 0 : const char *__pyx_filename = NULL;
6909 0 : int __pyx_clineno = 0;
6910 :
6911 : /* "View.MemoryView":254
6912 : * cdef PyObject **p
6913 : *
6914 : * self.free_data = True # <<<<<<<<<<<<<<
6915 : * self.data = <char *>malloc(self.len)
6916 : * if not self.data:
6917 : */
6918 0 : __pyx_v_self->free_data = 1;
6919 :
6920 : /* "View.MemoryView":255
6921 : *
6922 : * self.free_data = True
6923 : * self.data = <char *>malloc(self.len) # <<<<<<<<<<<<<<
6924 : * if not self.data:
6925 : * raise MemoryError, "unable to allocate array data."
6926 : */
6927 0 : __pyx_v_self->data = ((char *)malloc(__pyx_v_self->len));
6928 :
6929 : /* "View.MemoryView":256
6930 : * self.free_data = True
6931 : * self.data = <char *>malloc(self.len)
6932 : * if not self.data: # <<<<<<<<<<<<<<
6933 : * raise MemoryError, "unable to allocate array data."
6934 : *
6935 : */
6936 0 : __pyx_t_1 = (!(__pyx_v_self->data != 0));
6937 0 : if (unlikely(__pyx_t_1)) {
6938 :
6939 : /* "View.MemoryView":257
6940 : * self.data = <char *>malloc(self.len)
6941 : * if not self.data:
6942 : * raise MemoryError, "unable to allocate array data." # <<<<<<<<<<<<<<
6943 : *
6944 : * if self.dtype_is_object:
6945 : */
6946 0 : __Pyx_Raise(__pyx_builtin_MemoryError, __pyx_kp_s_unable_to_allocate_array_data, 0, 0);
6947 0 : __PYX_ERR(1, 257, __pyx_L1_error)
6948 :
6949 : /* "View.MemoryView":256
6950 : * self.free_data = True
6951 : * self.data = <char *>malloc(self.len)
6952 : * if not self.data: # <<<<<<<<<<<<<<
6953 : * raise MemoryError, "unable to allocate array data."
6954 : *
6955 : */
6956 : }
6957 :
6958 : /* "View.MemoryView":259
6959 : * raise MemoryError, "unable to allocate array data."
6960 : *
6961 : * if self.dtype_is_object: # <<<<<<<<<<<<<<
6962 : * p = <PyObject **> self.data
6963 : * for i in range(self.len // self.itemsize):
6964 : */
6965 0 : if (__pyx_v_self->dtype_is_object) {
6966 :
6967 : /* "View.MemoryView":260
6968 : *
6969 : * if self.dtype_is_object:
6970 : * p = <PyObject **> self.data # <<<<<<<<<<<<<<
6971 : * for i in range(self.len // self.itemsize):
6972 : * p[i] = Py_None
6973 : */
6974 0 : __pyx_v_p = ((PyObject **)__pyx_v_self->data);
6975 :
6976 : /* "View.MemoryView":261
6977 : * if self.dtype_is_object:
6978 : * p = <PyObject **> self.data
6979 : * for i in range(self.len // self.itemsize): # <<<<<<<<<<<<<<
6980 : * p[i] = Py_None
6981 : * Py_INCREF(Py_None)
6982 : */
6983 0 : if (unlikely(__pyx_v_self->itemsize == 0)) {
6984 0 : PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
6985 0 : __PYX_ERR(1, 261, __pyx_L1_error)
6986 : }
6987 0 : else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_self->itemsize == (Py_ssize_t)-1) && unlikely(__Pyx_UNARY_NEG_WOULD_OVERFLOW(__pyx_v_self->len))) {
6988 0 : PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
6989 0 : __PYX_ERR(1, 261, __pyx_L1_error)
6990 : }
6991 0 : __pyx_t_2 = __Pyx_div_Py_ssize_t(__pyx_v_self->len, __pyx_v_self->itemsize);
6992 0 : __pyx_t_3 = __pyx_t_2;
6993 0 : for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
6994 0 : __pyx_v_i = __pyx_t_4;
6995 :
6996 : /* "View.MemoryView":262
6997 : * p = <PyObject **> self.data
6998 : * for i in range(self.len // self.itemsize):
6999 : * p[i] = Py_None # <<<<<<<<<<<<<<
7000 : * Py_INCREF(Py_None)
7001 : * return 0
7002 : */
7003 0 : (__pyx_v_p[__pyx_v_i]) = Py_None;
7004 :
7005 : /* "View.MemoryView":263
7006 : * for i in range(self.len // self.itemsize):
7007 : * p[i] = Py_None
7008 : * Py_INCREF(Py_None) # <<<<<<<<<<<<<<
7009 : * return 0
7010 : *
7011 : */
7012 0 : Py_INCREF(Py_None);
7013 : }
7014 :
7015 : /* "View.MemoryView":259
7016 : * raise MemoryError, "unable to allocate array data."
7017 : *
7018 : * if self.dtype_is_object: # <<<<<<<<<<<<<<
7019 : * p = <PyObject **> self.data
7020 : * for i in range(self.len // self.itemsize):
7021 : */
7022 : }
7023 :
7024 : /* "View.MemoryView":264
7025 : * p[i] = Py_None
7026 : * Py_INCREF(Py_None)
7027 : * return 0 # <<<<<<<<<<<<<<
7028 : *
7029 : *
7030 : */
7031 0 : __pyx_r = 0;
7032 0 : goto __pyx_L0;
7033 :
7034 : /* "View.MemoryView":248
7035 : *
7036 : * @cname("__pyx_array_allocate_buffer")
7037 : * cdef int _allocate_buffer(array self) except -1: # <<<<<<<<<<<<<<
7038 : *
7039 : *
7040 : */
7041 :
7042 : /* function exit code */
7043 0 : __pyx_L1_error:;
7044 0 : __Pyx_AddTraceback("View.MemoryView._allocate_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
7045 0 : __pyx_r = -1;
7046 0 : __pyx_L0:;
7047 0 : return __pyx_r;
7048 : }
7049 :
7050 : /* "View.MemoryView":268
7051 : *
7052 : * @cname("__pyx_array_new")
7053 : * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, char *c_mode, char *buf): # <<<<<<<<<<<<<<
7054 : * cdef array result
7055 : * cdef str mode = "fortran" if c_mode[0] == b'f' else "c" # this often comes from a constant C string.
7056 : */
7057 :
7058 0 : static struct __pyx_array_obj *__pyx_array_new(PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, char *__pyx_v_format, char *__pyx_v_c_mode, char *__pyx_v_buf) {
7059 0 : struct __pyx_array_obj *__pyx_v_result = 0;
7060 0 : PyObject *__pyx_v_mode = 0;
7061 0 : struct __pyx_array_obj *__pyx_r = NULL;
7062 : __Pyx_RefNannyDeclarations
7063 0 : PyObject *__pyx_t_1 = NULL;
7064 0 : int __pyx_t_2;
7065 0 : PyObject *__pyx_t_3 = NULL;
7066 0 : PyObject *__pyx_t_4 = NULL;
7067 0 : int __pyx_lineno = 0;
7068 0 : const char *__pyx_filename = NULL;
7069 0 : int __pyx_clineno = 0;
7070 0 : __Pyx_RefNannySetupContext("array_cwrapper", 1);
7071 :
7072 : /* "View.MemoryView":270
7073 : * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, char *c_mode, char *buf):
7074 : * cdef array result
7075 : * cdef str mode = "fortran" if c_mode[0] == b'f' else "c" # this often comes from a constant C string. # <<<<<<<<<<<<<<
7076 : *
7077 : * if buf is NULL:
7078 : */
7079 0 : __pyx_t_2 = ((__pyx_v_c_mode[0]) == 'f');
7080 0 : if (__pyx_t_2) {
7081 0 : __Pyx_INCREF(__pyx_n_s_fortran);
7082 : __pyx_t_1 = __pyx_n_s_fortran;
7083 : } else {
7084 0 : __Pyx_INCREF(__pyx_n_s_c);
7085 : __pyx_t_1 = __pyx_n_s_c;
7086 : }
7087 0 : __pyx_v_mode = ((PyObject*)__pyx_t_1);
7088 0 : __pyx_t_1 = 0;
7089 :
7090 : /* "View.MemoryView":272
7091 : * cdef str mode = "fortran" if c_mode[0] == b'f' else "c" # this often comes from a constant C string.
7092 : *
7093 : * if buf is NULL: # <<<<<<<<<<<<<<
7094 : * result = array.__new__(array, shape, itemsize, format, mode)
7095 : * else:
7096 : */
7097 0 : __pyx_t_2 = (__pyx_v_buf == NULL);
7098 0 : if (__pyx_t_2) {
7099 :
7100 : /* "View.MemoryView":273
7101 : *
7102 : * if buf is NULL:
7103 : * result = array.__new__(array, shape, itemsize, format, mode) # <<<<<<<<<<<<<<
7104 : * else:
7105 : * result = array.__new__(array, shape, itemsize, format, mode, allocate_buffer=False)
7106 : */
7107 0 : __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 273, __pyx_L1_error)
7108 0 : __Pyx_GOTREF(__pyx_t_1);
7109 0 : __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 273, __pyx_L1_error)
7110 0 : __Pyx_GOTREF(__pyx_t_3);
7111 0 : __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 273, __pyx_L1_error)
7112 0 : __Pyx_GOTREF(__pyx_t_4);
7113 0 : __Pyx_INCREF(__pyx_v_shape);
7114 0 : __Pyx_GIVEREF(__pyx_v_shape);
7115 0 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_shape)) __PYX_ERR(1, 273, __pyx_L1_error);
7116 0 : __Pyx_GIVEREF(__pyx_t_1);
7117 0 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1)) __PYX_ERR(1, 273, __pyx_L1_error);
7118 0 : __Pyx_GIVEREF(__pyx_t_3);
7119 0 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3)) __PYX_ERR(1, 273, __pyx_L1_error);
7120 0 : __Pyx_INCREF(__pyx_v_mode);
7121 0 : __Pyx_GIVEREF(__pyx_v_mode);
7122 0 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_v_mode)) __PYX_ERR(1, 273, __pyx_L1_error);
7123 0 : __pyx_t_1 = 0;
7124 0 : __pyx_t_3 = 0;
7125 0 : __pyx_t_3 = ((PyObject *)__pyx_tp_new_array(((PyTypeObject *)__pyx_array_type), __pyx_t_4, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 273, __pyx_L1_error)
7126 0 : __Pyx_GOTREF((PyObject *)__pyx_t_3);
7127 0 : __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7128 0 : __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_3);
7129 0 : __pyx_t_3 = 0;
7130 :
7131 : /* "View.MemoryView":272
7132 : * cdef str mode = "fortran" if c_mode[0] == b'f' else "c" # this often comes from a constant C string.
7133 : *
7134 : * if buf is NULL: # <<<<<<<<<<<<<<
7135 : * result = array.__new__(array, shape, itemsize, format, mode)
7136 : * else:
7137 : */
7138 0 : goto __pyx_L3;
7139 : }
7140 :
7141 : /* "View.MemoryView":275
7142 : * result = array.__new__(array, shape, itemsize, format, mode)
7143 : * else:
7144 : * result = array.__new__(array, shape, itemsize, format, mode, allocate_buffer=False) # <<<<<<<<<<<<<<
7145 : * result.data = buf
7146 : *
7147 : */
7148 : /*else*/ {
7149 0 : __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 275, __pyx_L1_error)
7150 0 : __Pyx_GOTREF(__pyx_t_3);
7151 0 : __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 275, __pyx_L1_error)
7152 0 : __Pyx_GOTREF(__pyx_t_4);
7153 0 : __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 275, __pyx_L1_error)
7154 0 : __Pyx_GOTREF(__pyx_t_1);
7155 0 : __Pyx_INCREF(__pyx_v_shape);
7156 0 : __Pyx_GIVEREF(__pyx_v_shape);
7157 0 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_shape)) __PYX_ERR(1, 275, __pyx_L1_error);
7158 0 : __Pyx_GIVEREF(__pyx_t_3);
7159 0 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3)) __PYX_ERR(1, 275, __pyx_L1_error);
7160 0 : __Pyx_GIVEREF(__pyx_t_4);
7161 0 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_4)) __PYX_ERR(1, 275, __pyx_L1_error);
7162 0 : __Pyx_INCREF(__pyx_v_mode);
7163 0 : __Pyx_GIVEREF(__pyx_v_mode);
7164 0 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_mode)) __PYX_ERR(1, 275, __pyx_L1_error);
7165 0 : __pyx_t_3 = 0;
7166 0 : __pyx_t_4 = 0;
7167 0 : __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 275, __pyx_L1_error)
7168 0 : __Pyx_GOTREF(__pyx_t_4);
7169 0 : if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_allocate_buffer, Py_False) < 0) __PYX_ERR(1, 275, __pyx_L1_error)
7170 0 : __pyx_t_3 = ((PyObject *)__pyx_tp_new_array(((PyTypeObject *)__pyx_array_type), __pyx_t_1, __pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 275, __pyx_L1_error)
7171 0 : __Pyx_GOTREF((PyObject *)__pyx_t_3);
7172 0 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7173 0 : __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7174 0 : __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_3);
7175 0 : __pyx_t_3 = 0;
7176 :
7177 : /* "View.MemoryView":276
7178 : * else:
7179 : * result = array.__new__(array, shape, itemsize, format, mode, allocate_buffer=False)
7180 : * result.data = buf # <<<<<<<<<<<<<<
7181 : *
7182 : * return result
7183 : */
7184 0 : __pyx_v_result->data = __pyx_v_buf;
7185 : }
7186 0 : __pyx_L3:;
7187 :
7188 : /* "View.MemoryView":278
7189 : * result.data = buf
7190 : *
7191 : * return result # <<<<<<<<<<<<<<
7192 : *
7193 : *
7194 : */
7195 0 : __Pyx_XDECREF((PyObject *)__pyx_r);
7196 0 : __Pyx_INCREF((PyObject *)__pyx_v_result);
7197 0 : __pyx_r = __pyx_v_result;
7198 0 : goto __pyx_L0;
7199 :
7200 : /* "View.MemoryView":268
7201 : *
7202 : * @cname("__pyx_array_new")
7203 : * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, char *c_mode, char *buf): # <<<<<<<<<<<<<<
7204 : * cdef array result
7205 : * cdef str mode = "fortran" if c_mode[0] == b'f' else "c" # this often comes from a constant C string.
7206 : */
7207 :
7208 : /* function exit code */
7209 0 : __pyx_L1_error:;
7210 0 : __Pyx_XDECREF(__pyx_t_1);
7211 0 : __Pyx_XDECREF(__pyx_t_3);
7212 0 : __Pyx_XDECREF(__pyx_t_4);
7213 0 : __Pyx_AddTraceback("View.MemoryView.array_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
7214 0 : __pyx_r = 0;
7215 0 : __pyx_L0:;
7216 0 : __Pyx_XDECREF((PyObject *)__pyx_v_result);
7217 0 : __Pyx_XDECREF(__pyx_v_mode);
7218 0 : __Pyx_XGIVEREF((PyObject *)__pyx_r);
7219 0 : __Pyx_RefNannyFinishContext();
7220 0 : return __pyx_r;
7221 : }
7222 :
7223 : /* "View.MemoryView":304
7224 : * cdef class Enum(object):
7225 : * cdef object name
7226 : * def __init__(self, name): # <<<<<<<<<<<<<<
7227 : * self.name = name
7228 : * def __repr__(self):
7229 : */
7230 :
7231 : /* Python wrapper */
7232 : static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
7233 15 : static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
7234 15 : PyObject *__pyx_v_name = 0;
7235 15 : CYTHON_UNUSED Py_ssize_t __pyx_nargs;
7236 15 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
7237 15 : PyObject* values[1] = {0};
7238 15 : int __pyx_lineno = 0;
7239 15 : const char *__pyx_filename = NULL;
7240 15 : int __pyx_clineno = 0;
7241 15 : int __pyx_r;
7242 : __Pyx_RefNannyDeclarations
7243 15 : __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
7244 : #if CYTHON_ASSUME_SAFE_MACROS
7245 15 : __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
7246 : #else
7247 : __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
7248 : #endif
7249 15 : __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
7250 : {
7251 15 : PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,0};
7252 15 : if (__pyx_kwds) {
7253 0 : Py_ssize_t kw_args;
7254 0 : switch (__pyx_nargs) {
7255 0 : case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
7256 0 : CYTHON_FALLTHROUGH;
7257 0 : case 0: break;
7258 0 : default: goto __pyx_L5_argtuple_error;
7259 : }
7260 0 : kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
7261 0 : switch (__pyx_nargs) {
7262 0 : case 0:
7263 0 : if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_name)) != 0)) {
7264 0 : (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
7265 0 : kw_args--;
7266 : }
7267 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 304, __pyx_L3_error)
7268 0 : else goto __pyx_L5_argtuple_error;
7269 : }
7270 0 : if (unlikely(kw_args > 0)) {
7271 0 : const Py_ssize_t kwd_pos_args = __pyx_nargs;
7272 0 : if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(1, 304, __pyx_L3_error)
7273 : }
7274 15 : } else if (unlikely(__pyx_nargs != 1)) {
7275 0 : goto __pyx_L5_argtuple_error;
7276 : } else {
7277 15 : values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
7278 : }
7279 15 : __pyx_v_name = values[0];
7280 : }
7281 15 : goto __pyx_L6_skip;
7282 0 : __pyx_L5_argtuple_error:;
7283 0 : __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 304, __pyx_L3_error)
7284 15 : __pyx_L6_skip:;
7285 15 : goto __pyx_L4_argument_unpacking_done;
7286 0 : __pyx_L3_error:;
7287 : {
7288 0 : Py_ssize_t __pyx_temp;
7289 0 : for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
7290 : __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
7291 : }
7292 : }
7293 0 : __Pyx_AddTraceback("View.MemoryView.Enum.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7294 0 : __Pyx_RefNannyFinishContext();
7295 0 : return -1;
7296 15 : __pyx_L4_argument_unpacking_done:;
7297 15 : __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), __pyx_v_name);
7298 :
7299 : /* function exit code */
7300 : {
7301 15 : Py_ssize_t __pyx_temp;
7302 15 : for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
7303 : __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
7304 : }
7305 : }
7306 : __Pyx_RefNannyFinishContext();
7307 : return __pyx_r;
7308 : }
7309 :
7310 15 : static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name) {
7311 15 : int __pyx_r;
7312 : __Pyx_RefNannyDeclarations
7313 15 : __Pyx_RefNannySetupContext("__init__", 1);
7314 :
7315 : /* "View.MemoryView":305
7316 : * cdef object name
7317 : * def __init__(self, name):
7318 : * self.name = name # <<<<<<<<<<<<<<
7319 : * def __repr__(self):
7320 : * return self.name
7321 : */
7322 15 : __Pyx_INCREF(__pyx_v_name);
7323 15 : __Pyx_GIVEREF(__pyx_v_name);
7324 15 : __Pyx_GOTREF(__pyx_v_self->name);
7325 15 : __Pyx_DECREF(__pyx_v_self->name);
7326 15 : __pyx_v_self->name = __pyx_v_name;
7327 :
7328 : /* "View.MemoryView":304
7329 : * cdef class Enum(object):
7330 : * cdef object name
7331 : * def __init__(self, name): # <<<<<<<<<<<<<<
7332 : * self.name = name
7333 : * def __repr__(self):
7334 : */
7335 :
7336 : /* function exit code */
7337 15 : __pyx_r = 0;
7338 15 : __Pyx_RefNannyFinishContext();
7339 15 : return __pyx_r;
7340 : }
7341 :
7342 : /* "View.MemoryView":306
7343 : * def __init__(self, name):
7344 : * self.name = name
7345 : * def __repr__(self): # <<<<<<<<<<<<<<
7346 : * return self.name
7347 : *
7348 : */
7349 :
7350 : /* Python wrapper */
7351 : static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self); /*proto*/
7352 0 : static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self) {
7353 0 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
7354 0 : PyObject *__pyx_r = 0;
7355 : __Pyx_RefNannyDeclarations
7356 0 : __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
7357 0 : __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
7358 0 : __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self));
7359 :
7360 : /* function exit code */
7361 0 : __Pyx_RefNannyFinishContext();
7362 0 : return __pyx_r;
7363 : }
7364 :
7365 0 : static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self) {
7366 0 : PyObject *__pyx_r = NULL;
7367 : __Pyx_RefNannyDeclarations
7368 0 : __Pyx_RefNannySetupContext("__repr__", 1);
7369 :
7370 : /* "View.MemoryView":307
7371 : * self.name = name
7372 : * def __repr__(self):
7373 : * return self.name # <<<<<<<<<<<<<<
7374 : *
7375 : * cdef generic = Enum("<strided and direct or indirect>")
7376 : */
7377 0 : __Pyx_XDECREF(__pyx_r);
7378 0 : __Pyx_INCREF(__pyx_v_self->name);
7379 0 : __pyx_r = __pyx_v_self->name;
7380 0 : goto __pyx_L0;
7381 :
7382 : /* "View.MemoryView":306
7383 : * def __init__(self, name):
7384 : * self.name = name
7385 : * def __repr__(self): # <<<<<<<<<<<<<<
7386 : * return self.name
7387 : *
7388 : */
7389 :
7390 : /* function exit code */
7391 0 : __pyx_L0:;
7392 0 : __Pyx_XGIVEREF(__pyx_r);
7393 0 : __Pyx_RefNannyFinishContext();
7394 0 : return __pyx_r;
7395 : }
7396 :
7397 : /* "(tree fragment)":1
7398 : * def __reduce_cython__(self): # <<<<<<<<<<<<<<
7399 : * cdef tuple state
7400 : * cdef object _dict
7401 : */
7402 :
7403 : /* Python wrapper */
7404 : static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self,
7405 : #if CYTHON_METH_FASTCALL
7406 : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
7407 : #else
7408 : PyObject *__pyx_args, PyObject *__pyx_kwds
7409 : #endif
7410 : ); /*proto*/
7411 0 : static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self,
7412 : #if CYTHON_METH_FASTCALL
7413 : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
7414 : #else
7415 : PyObject *__pyx_args, PyObject *__pyx_kwds
7416 : #endif
7417 : ) {
7418 : #if !CYTHON_METH_FASTCALL
7419 : CYTHON_UNUSED Py_ssize_t __pyx_nargs;
7420 : #endif
7421 0 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
7422 0 : PyObject *__pyx_r = 0;
7423 : __Pyx_RefNannyDeclarations
7424 0 : __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
7425 : #if !CYTHON_METH_FASTCALL
7426 : #if CYTHON_ASSUME_SAFE_MACROS
7427 : __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
7428 : #else
7429 : __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
7430 : #endif
7431 : #endif
7432 0 : __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
7433 0 : if (unlikely(__pyx_nargs > 0)) {
7434 0 : __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
7435 0 : if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
7436 0 : __pyx_r = __pyx_pf___pyx_MemviewEnum___reduce_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self));
7437 :
7438 : /* function exit code */
7439 0 : __Pyx_RefNannyFinishContext();
7440 0 : return __pyx_r;
7441 : }
7442 :
7443 0 : static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self) {
7444 0 : PyObject *__pyx_v_state = 0;
7445 0 : PyObject *__pyx_v__dict = 0;
7446 0 : int __pyx_v_use_setstate;
7447 0 : PyObject *__pyx_r = NULL;
7448 : __Pyx_RefNannyDeclarations
7449 0 : PyObject *__pyx_t_1 = NULL;
7450 0 : int __pyx_t_2;
7451 0 : PyObject *__pyx_t_3 = NULL;
7452 0 : PyObject *__pyx_t_4 = NULL;
7453 0 : int __pyx_lineno = 0;
7454 0 : const char *__pyx_filename = NULL;
7455 0 : int __pyx_clineno = 0;
7456 0 : __Pyx_RefNannySetupContext("__reduce_cython__", 1);
7457 :
7458 : /* "(tree fragment)":5
7459 : * cdef object _dict
7460 : * cdef bint use_setstate
7461 : * state = (self.name,) # <<<<<<<<<<<<<<
7462 : * _dict = getattr(self, '__dict__', None)
7463 : * if _dict is not None:
7464 : */
7465 0 : __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
7466 0 : __Pyx_GOTREF(__pyx_t_1);
7467 0 : __Pyx_INCREF(__pyx_v_self->name);
7468 0 : __Pyx_GIVEREF(__pyx_v_self->name);
7469 0 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->name)) __PYX_ERR(1, 5, __pyx_L1_error);
7470 0 : __pyx_v_state = ((PyObject*)__pyx_t_1);
7471 0 : __pyx_t_1 = 0;
7472 :
7473 : /* "(tree fragment)":6
7474 : * cdef bint use_setstate
7475 : * state = (self.name,)
7476 : * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
7477 : * if _dict is not None:
7478 : * state += (_dict,)
7479 : */
7480 0 : __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
7481 0 : __Pyx_GOTREF(__pyx_t_1);
7482 0 : __pyx_v__dict = __pyx_t_1;
7483 0 : __pyx_t_1 = 0;
7484 :
7485 : /* "(tree fragment)":7
7486 : * state = (self.name,)
7487 : * _dict = getattr(self, '__dict__', None)
7488 : * if _dict is not None: # <<<<<<<<<<<<<<
7489 : * state += (_dict,)
7490 : * use_setstate = True
7491 : */
7492 0 : __pyx_t_2 = (__pyx_v__dict != Py_None);
7493 0 : if (__pyx_t_2) {
7494 :
7495 : /* "(tree fragment)":8
7496 : * _dict = getattr(self, '__dict__', None)
7497 : * if _dict is not None:
7498 : * state += (_dict,) # <<<<<<<<<<<<<<
7499 : * use_setstate = True
7500 : * else:
7501 : */
7502 0 : __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
7503 0 : __Pyx_GOTREF(__pyx_t_1);
7504 0 : __Pyx_INCREF(__pyx_v__dict);
7505 0 : __Pyx_GIVEREF(__pyx_v__dict);
7506 0 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict)) __PYX_ERR(1, 8, __pyx_L1_error);
7507 0 : __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 8, __pyx_L1_error)
7508 0 : __Pyx_GOTREF(__pyx_t_3);
7509 0 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7510 0 : __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3));
7511 0 : __pyx_t_3 = 0;
7512 :
7513 : /* "(tree fragment)":9
7514 : * if _dict is not None:
7515 : * state += (_dict,)
7516 : * use_setstate = True # <<<<<<<<<<<<<<
7517 : * else:
7518 : * use_setstate = self.name is not None
7519 : */
7520 0 : __pyx_v_use_setstate = 1;
7521 :
7522 : /* "(tree fragment)":7
7523 : * state = (self.name,)
7524 : * _dict = getattr(self, '__dict__', None)
7525 : * if _dict is not None: # <<<<<<<<<<<<<<
7526 : * state += (_dict,)
7527 : * use_setstate = True
7528 : */
7529 0 : goto __pyx_L3;
7530 : }
7531 :
7532 : /* "(tree fragment)":11
7533 : * use_setstate = True
7534 : * else:
7535 : * use_setstate = self.name is not None # <<<<<<<<<<<<<<
7536 : * if use_setstate:
7537 : * return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state
7538 : */
7539 : /*else*/ {
7540 0 : __pyx_t_2 = (__pyx_v_self->name != Py_None);
7541 0 : __pyx_v_use_setstate = __pyx_t_2;
7542 : }
7543 0 : __pyx_L3:;
7544 :
7545 : /* "(tree fragment)":12
7546 : * else:
7547 : * use_setstate = self.name is not None
7548 : * if use_setstate: # <<<<<<<<<<<<<<
7549 : * return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state
7550 : * else:
7551 : */
7552 0 : if (__pyx_v_use_setstate) {
7553 :
7554 : /* "(tree fragment)":13
7555 : * use_setstate = self.name is not None
7556 : * if use_setstate:
7557 : * return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state # <<<<<<<<<<<<<<
7558 : * else:
7559 : * return __pyx_unpickle_Enum, (type(self), 0x82a3537, state)
7560 : */
7561 0 : __Pyx_XDECREF(__pyx_r);
7562 0 : __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pyx_unpickle_Enum); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error)
7563 0 : __Pyx_GOTREF(__pyx_t_3);
7564 0 : __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
7565 0 : __Pyx_GOTREF(__pyx_t_1);
7566 0 : __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
7567 0 : __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
7568 0 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(1, 13, __pyx_L1_error);
7569 0 : __Pyx_INCREF(__pyx_int_136983863);
7570 0 : __Pyx_GIVEREF(__pyx_int_136983863);
7571 0 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_136983863)) __PYX_ERR(1, 13, __pyx_L1_error);
7572 0 : __Pyx_INCREF(Py_None);
7573 0 : __Pyx_GIVEREF(Py_None);
7574 0 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None)) __PYX_ERR(1, 13, __pyx_L1_error);
7575 0 : __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
7576 0 : __Pyx_GOTREF(__pyx_t_4);
7577 0 : __Pyx_GIVEREF(__pyx_t_3);
7578 0 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error);
7579 0 : __Pyx_GIVEREF(__pyx_t_1);
7580 0 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error);
7581 0 : __Pyx_INCREF(__pyx_v_state);
7582 0 : __Pyx_GIVEREF(__pyx_v_state);
7583 0 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state)) __PYX_ERR(1, 13, __pyx_L1_error);
7584 0 : __pyx_t_3 = 0;
7585 0 : __pyx_t_1 = 0;
7586 0 : __pyx_r = __pyx_t_4;
7587 0 : __pyx_t_4 = 0;
7588 0 : goto __pyx_L0;
7589 :
7590 : /* "(tree fragment)":12
7591 : * else:
7592 : * use_setstate = self.name is not None
7593 : * if use_setstate: # <<<<<<<<<<<<<<
7594 : * return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state
7595 : * else:
7596 : */
7597 : }
7598 :
7599 : /* "(tree fragment)":15
7600 : * return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state
7601 : * else:
7602 : * return __pyx_unpickle_Enum, (type(self), 0x82a3537, state) # <<<<<<<<<<<<<<
7603 : * def __setstate_cython__(self, __pyx_state):
7604 : * __pyx_unpickle_Enum__set_state(self, __pyx_state)
7605 : */
7606 : /*else*/ {
7607 0 : __Pyx_XDECREF(__pyx_r);
7608 0 : __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Enum); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
7609 0 : __Pyx_GOTREF(__pyx_t_4);
7610 0 : __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
7611 0 : __Pyx_GOTREF(__pyx_t_1);
7612 0 : __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
7613 0 : __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
7614 0 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(1, 15, __pyx_L1_error);
7615 0 : __Pyx_INCREF(__pyx_int_136983863);
7616 0 : __Pyx_GIVEREF(__pyx_int_136983863);
7617 0 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_136983863)) __PYX_ERR(1, 15, __pyx_L1_error);
7618 0 : __Pyx_INCREF(__pyx_v_state);
7619 0 : __Pyx_GIVEREF(__pyx_v_state);
7620 0 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state)) __PYX_ERR(1, 15, __pyx_L1_error);
7621 0 : __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error)
7622 0 : __Pyx_GOTREF(__pyx_t_3);
7623 0 : __Pyx_GIVEREF(__pyx_t_4);
7624 0 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error);
7625 0 : __Pyx_GIVEREF(__pyx_t_1);
7626 0 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error);
7627 0 : __pyx_t_4 = 0;
7628 0 : __pyx_t_1 = 0;
7629 0 : __pyx_r = __pyx_t_3;
7630 0 : __pyx_t_3 = 0;
7631 0 : goto __pyx_L0;
7632 : }
7633 :
7634 : /* "(tree fragment)":1
7635 : * def __reduce_cython__(self): # <<<<<<<<<<<<<<
7636 : * cdef tuple state
7637 : * cdef object _dict
7638 : */
7639 :
7640 : /* function exit code */
7641 0 : __pyx_L1_error:;
7642 0 : __Pyx_XDECREF(__pyx_t_1);
7643 0 : __Pyx_XDECREF(__pyx_t_3);
7644 0 : __Pyx_XDECREF(__pyx_t_4);
7645 0 : __Pyx_AddTraceback("View.MemoryView.Enum.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7646 0 : __pyx_r = NULL;
7647 0 : __pyx_L0:;
7648 0 : __Pyx_XDECREF(__pyx_v_state);
7649 0 : __Pyx_XDECREF(__pyx_v__dict);
7650 0 : __Pyx_XGIVEREF(__pyx_r);
7651 0 : __Pyx_RefNannyFinishContext();
7652 0 : return __pyx_r;
7653 : }
7654 :
7655 : /* "(tree fragment)":16
7656 : * else:
7657 : * return __pyx_unpickle_Enum, (type(self), 0x82a3537, state)
7658 : * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
7659 : * __pyx_unpickle_Enum__set_state(self, __pyx_state)
7660 : */
7661 :
7662 : /* Python wrapper */
7663 : static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self,
7664 : #if CYTHON_METH_FASTCALL
7665 : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
7666 : #else
7667 : PyObject *__pyx_args, PyObject *__pyx_kwds
7668 : #endif
7669 : ); /*proto*/
7670 0 : static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self,
7671 : #if CYTHON_METH_FASTCALL
7672 : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
7673 : #else
7674 : PyObject *__pyx_args, PyObject *__pyx_kwds
7675 : #endif
7676 : ) {
7677 0 : PyObject *__pyx_v___pyx_state = 0;
7678 : #if !CYTHON_METH_FASTCALL
7679 : CYTHON_UNUSED Py_ssize_t __pyx_nargs;
7680 : #endif
7681 0 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
7682 0 : PyObject* values[1] = {0};
7683 0 : int __pyx_lineno = 0;
7684 0 : const char *__pyx_filename = NULL;
7685 0 : int __pyx_clineno = 0;
7686 0 : PyObject *__pyx_r = 0;
7687 : __Pyx_RefNannyDeclarations
7688 0 : __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
7689 : #if !CYTHON_METH_FASTCALL
7690 : #if CYTHON_ASSUME_SAFE_MACROS
7691 : __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
7692 : #else
7693 : __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
7694 : #endif
7695 : #endif
7696 0 : __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
7697 : {
7698 0 : PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
7699 0 : if (__pyx_kwds) {
7700 0 : Py_ssize_t kw_args;
7701 0 : switch (__pyx_nargs) {
7702 0 : case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
7703 0 : CYTHON_FALLTHROUGH;
7704 0 : case 0: break;
7705 0 : default: goto __pyx_L5_argtuple_error;
7706 : }
7707 0 : kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
7708 0 : switch (__pyx_nargs) {
7709 : case 0:
7710 0 : if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
7711 0 : (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
7712 0 : kw_args--;
7713 : }
7714 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 16, __pyx_L3_error)
7715 0 : else goto __pyx_L5_argtuple_error;
7716 : }
7717 0 : if (unlikely(kw_args > 0)) {
7718 0 : const Py_ssize_t kwd_pos_args = __pyx_nargs;
7719 0 : if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 16, __pyx_L3_error)
7720 : }
7721 0 : } else if (unlikely(__pyx_nargs != 1)) {
7722 0 : goto __pyx_L5_argtuple_error;
7723 : } else {
7724 0 : values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
7725 : }
7726 0 : __pyx_v___pyx_state = values[0];
7727 : }
7728 0 : goto __pyx_L6_skip;
7729 0 : __pyx_L5_argtuple_error:;
7730 0 : __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error)
7731 0 : __pyx_L6_skip:;
7732 0 : goto __pyx_L4_argument_unpacking_done;
7733 0 : __pyx_L3_error:;
7734 : {
7735 0 : Py_ssize_t __pyx_temp;
7736 0 : for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
7737 : __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
7738 : }
7739 : }
7740 0 : __Pyx_AddTraceback("View.MemoryView.Enum.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7741 0 : __Pyx_RefNannyFinishContext();
7742 0 : return NULL;
7743 0 : __pyx_L4_argument_unpacking_done:;
7744 0 : __pyx_r = __pyx_pf___pyx_MemviewEnum_2__setstate_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), __pyx_v___pyx_state);
7745 :
7746 : /* function exit code */
7747 : {
7748 0 : Py_ssize_t __pyx_temp;
7749 0 : for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
7750 : __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
7751 : }
7752 : }
7753 : __Pyx_RefNannyFinishContext();
7754 : return __pyx_r;
7755 : }
7756 :
7757 0 : static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
7758 0 : PyObject *__pyx_r = NULL;
7759 : __Pyx_RefNannyDeclarations
7760 0 : PyObject *__pyx_t_1 = NULL;
7761 0 : int __pyx_lineno = 0;
7762 0 : const char *__pyx_filename = NULL;
7763 0 : int __pyx_clineno = 0;
7764 0 : __Pyx_RefNannySetupContext("__setstate_cython__", 1);
7765 :
7766 : /* "(tree fragment)":17
7767 : * return __pyx_unpickle_Enum, (type(self), 0x82a3537, state)
7768 : * def __setstate_cython__(self, __pyx_state):
7769 : * __pyx_unpickle_Enum__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
7770 : */
7771 0 : if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(1, 17, __pyx_L1_error)
7772 0 : __pyx_t_1 = __pyx_unpickle_Enum__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
7773 0 : __Pyx_GOTREF(__pyx_t_1);
7774 0 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7775 :
7776 : /* "(tree fragment)":16
7777 : * else:
7778 : * return __pyx_unpickle_Enum, (type(self), 0x82a3537, state)
7779 : * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
7780 : * __pyx_unpickle_Enum__set_state(self, __pyx_state)
7781 : */
7782 :
7783 : /* function exit code */
7784 0 : __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7785 0 : goto __pyx_L0;
7786 0 : __pyx_L1_error:;
7787 0 : __Pyx_XDECREF(__pyx_t_1);
7788 0 : __Pyx_AddTraceback("View.MemoryView.Enum.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7789 0 : __pyx_r = NULL;
7790 0 : __pyx_L0:;
7791 0 : __Pyx_XGIVEREF(__pyx_r);
7792 0 : __Pyx_RefNannyFinishContext();
7793 0 : return __pyx_r;
7794 : }
7795 :
7796 : /* "View.MemoryView":349
7797 : * cdef __Pyx_TypeInfo *typeinfo
7798 : *
7799 : * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False): # <<<<<<<<<<<<<<
7800 : * self.obj = obj
7801 : * self.flags = flags
7802 : */
7803 :
7804 : /* Python wrapper */
7805 : static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
7806 3057 : static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
7807 3057 : PyObject *__pyx_v_obj = 0;
7808 3057 : int __pyx_v_flags;
7809 3057 : int __pyx_v_dtype_is_object;
7810 3057 : CYTHON_UNUSED Py_ssize_t __pyx_nargs;
7811 3057 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
7812 3057 : PyObject* values[3] = {0,0,0};
7813 3057 : int __pyx_lineno = 0;
7814 3057 : const char *__pyx_filename = NULL;
7815 3057 : int __pyx_clineno = 0;
7816 3057 : int __pyx_r;
7817 : __Pyx_RefNannyDeclarations
7818 3057 : __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
7819 : #if CYTHON_ASSUME_SAFE_MACROS
7820 3057 : __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
7821 : #else
7822 : __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
7823 : #endif
7824 3057 : __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
7825 : {
7826 3057 : PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_flags,&__pyx_n_s_dtype_is_object,0};
7827 3057 : if (__pyx_kwds) {
7828 0 : Py_ssize_t kw_args;
7829 0 : switch (__pyx_nargs) {
7830 0 : case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
7831 0 : CYTHON_FALLTHROUGH;
7832 0 : case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
7833 0 : CYTHON_FALLTHROUGH;
7834 0 : case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
7835 0 : CYTHON_FALLTHROUGH;
7836 0 : case 0: break;
7837 0 : default: goto __pyx_L5_argtuple_error;
7838 : }
7839 0 : kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
7840 0 : switch (__pyx_nargs) {
7841 0 : case 0:
7842 0 : if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) {
7843 0 : (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
7844 0 : kw_args--;
7845 : }
7846 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 349, __pyx_L3_error)
7847 0 : else goto __pyx_L5_argtuple_error;
7848 0 : CYTHON_FALLTHROUGH;
7849 : case 1:
7850 0 : if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_flags)) != 0)) {
7851 0 : (void)__Pyx_Arg_NewRef_VARARGS(values[1]);
7852 0 : kw_args--;
7853 : }
7854 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 349, __pyx_L3_error)
7855 : else {
7856 0 : __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, 1); __PYX_ERR(1, 349, __pyx_L3_error)
7857 : }
7858 0 : CYTHON_FALLTHROUGH;
7859 : case 2:
7860 0 : if (kw_args > 0) {
7861 0 : PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_dtype_is_object);
7862 0 : if (value) { values[2] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
7863 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 349, __pyx_L3_error)
7864 : }
7865 : }
7866 0 : if (unlikely(kw_args > 0)) {
7867 0 : const Py_ssize_t kwd_pos_args = __pyx_nargs;
7868 0 : if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(1, 349, __pyx_L3_error)
7869 : }
7870 : } else {
7871 3057 : switch (__pyx_nargs) {
7872 3057 : case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
7873 3057 : CYTHON_FALLTHROUGH;
7874 3057 : case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
7875 3057 : values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
7876 3057 : break;
7877 0 : default: goto __pyx_L5_argtuple_error;
7878 : }
7879 : }
7880 3057 : __pyx_v_obj = values[0];
7881 3057 : __pyx_v_flags = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_flags == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 349, __pyx_L3_error)
7882 3057 : if (values[2]) {
7883 3057 : __pyx_v_dtype_is_object = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_dtype_is_object == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 349, __pyx_L3_error)
7884 : } else {
7885 : __pyx_v_dtype_is_object = ((int)0);
7886 : }
7887 : }
7888 3057 : goto __pyx_L6_skip;
7889 0 : __pyx_L5_argtuple_error:;
7890 0 : __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, __pyx_nargs); __PYX_ERR(1, 349, __pyx_L3_error)
7891 3057 : __pyx_L6_skip:;
7892 3057 : goto __pyx_L4_argument_unpacking_done;
7893 0 : __pyx_L3_error:;
7894 : {
7895 0 : Py_ssize_t __pyx_temp;
7896 0 : for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
7897 : __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
7898 : }
7899 : }
7900 0 : __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7901 0 : __Pyx_RefNannyFinishContext();
7902 0 : return -1;
7903 3057 : __pyx_L4_argument_unpacking_done:;
7904 3057 : __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_obj, __pyx_v_flags, __pyx_v_dtype_is_object);
7905 :
7906 : /* function exit code */
7907 : {
7908 3057 : Py_ssize_t __pyx_temp;
7909 3057 : for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
7910 : __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
7911 : }
7912 : }
7913 : __Pyx_RefNannyFinishContext();
7914 : return __pyx_r;
7915 : }
7916 :
7917 3057 : static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object) {
7918 3057 : int __pyx_r;
7919 : __Pyx_RefNannyDeclarations
7920 3057 : int __pyx_t_1;
7921 3057 : int __pyx_t_2;
7922 3057 : int __pyx_t_3;
7923 3057 : Py_intptr_t __pyx_t_4;
7924 3057 : size_t __pyx_t_5;
7925 3057 : int __pyx_lineno = 0;
7926 3057 : const char *__pyx_filename = NULL;
7927 3057 : int __pyx_clineno = 0;
7928 3057 : __Pyx_RefNannySetupContext("__cinit__", 1);
7929 :
7930 : /* "View.MemoryView":350
7931 : *
7932 : * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):
7933 : * self.obj = obj # <<<<<<<<<<<<<<
7934 : * self.flags = flags
7935 : * if type(self) is memoryview or obj is not None:
7936 : */
7937 3057 : __Pyx_INCREF(__pyx_v_obj);
7938 3057 : __Pyx_GIVEREF(__pyx_v_obj);
7939 3057 : __Pyx_GOTREF(__pyx_v_self->obj);
7940 3057 : __Pyx_DECREF(__pyx_v_self->obj);
7941 3057 : __pyx_v_self->obj = __pyx_v_obj;
7942 :
7943 : /* "View.MemoryView":351
7944 : * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):
7945 : * self.obj = obj
7946 : * self.flags = flags # <<<<<<<<<<<<<<
7947 : * if type(self) is memoryview or obj is not None:
7948 : * __Pyx_GetBuffer(obj, &self.view, flags)
7949 : */
7950 3057 : __pyx_v_self->flags = __pyx_v_flags;
7951 :
7952 : /* "View.MemoryView":352
7953 : * self.obj = obj
7954 : * self.flags = flags
7955 : * if type(self) is memoryview or obj is not None: # <<<<<<<<<<<<<<
7956 : * __Pyx_GetBuffer(obj, &self.view, flags)
7957 : * if <PyObject *> self.view.obj == NULL:
7958 : */
7959 3057 : __pyx_t_2 = (((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))) == ((PyObject *)__pyx_memoryview_type));
7960 3057 : if (!__pyx_t_2) {
7961 0 : } else {
7962 3057 : __pyx_t_1 = __pyx_t_2;
7963 3057 : goto __pyx_L4_bool_binop_done;
7964 : }
7965 0 : __pyx_t_2 = (__pyx_v_obj != Py_None);
7966 0 : __pyx_t_1 = __pyx_t_2;
7967 3057 : __pyx_L4_bool_binop_done:;
7968 3057 : if (__pyx_t_1) {
7969 :
7970 : /* "View.MemoryView":353
7971 : * self.flags = flags
7972 : * if type(self) is memoryview or obj is not None:
7973 : * __Pyx_GetBuffer(obj, &self.view, flags) # <<<<<<<<<<<<<<
7974 : * if <PyObject *> self.view.obj == NULL:
7975 : * (<__pyx_buffer *> &self.view).obj = Py_None
7976 : */
7977 3057 : __pyx_t_3 = __Pyx_GetBuffer(__pyx_v_obj, (&__pyx_v_self->view), __pyx_v_flags); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 353, __pyx_L1_error)
7978 :
7979 : /* "View.MemoryView":354
7980 : * if type(self) is memoryview or obj is not None:
7981 : * __Pyx_GetBuffer(obj, &self.view, flags)
7982 : * if <PyObject *> self.view.obj == NULL: # <<<<<<<<<<<<<<
7983 : * (<__pyx_buffer *> &self.view).obj = Py_None
7984 : * Py_INCREF(Py_None)
7985 : */
7986 3057 : __pyx_t_1 = (((PyObject *)__pyx_v_self->view.obj) == NULL);
7987 3057 : if (__pyx_t_1) {
7988 :
7989 : /* "View.MemoryView":355
7990 : * __Pyx_GetBuffer(obj, &self.view, flags)
7991 : * if <PyObject *> self.view.obj == NULL:
7992 : * (<__pyx_buffer *> &self.view).obj = Py_None # <<<<<<<<<<<<<<
7993 : * Py_INCREF(Py_None)
7994 : *
7995 : */
7996 0 : ((Py_buffer *)(&__pyx_v_self->view))->obj = Py_None;
7997 :
7998 : /* "View.MemoryView":356
7999 : * if <PyObject *> self.view.obj == NULL:
8000 : * (<__pyx_buffer *> &self.view).obj = Py_None
8001 : * Py_INCREF(Py_None) # <<<<<<<<<<<<<<
8002 : *
8003 : * if not __PYX_CYTHON_ATOMICS_ENABLED():
8004 : */
8005 0 : Py_INCREF(Py_None);
8006 :
8007 : /* "View.MemoryView":354
8008 : * if type(self) is memoryview or obj is not None:
8009 : * __Pyx_GetBuffer(obj, &self.view, flags)
8010 : * if <PyObject *> self.view.obj == NULL: # <<<<<<<<<<<<<<
8011 : * (<__pyx_buffer *> &self.view).obj = Py_None
8012 : * Py_INCREF(Py_None)
8013 : */
8014 : }
8015 :
8016 : /* "View.MemoryView":352
8017 : * self.obj = obj
8018 : * self.flags = flags
8019 : * if type(self) is memoryview or obj is not None: # <<<<<<<<<<<<<<
8020 : * __Pyx_GetBuffer(obj, &self.view, flags)
8021 : * if <PyObject *> self.view.obj == NULL:
8022 : */
8023 : }
8024 :
8025 : /* "View.MemoryView":358
8026 : * Py_INCREF(Py_None)
8027 : *
8028 : * if not __PYX_CYTHON_ATOMICS_ENABLED(): # <<<<<<<<<<<<<<
8029 : * global __pyx_memoryview_thread_locks_used
8030 : * if __pyx_memoryview_thread_locks_used < 8:
8031 : */
8032 3057 : __pyx_t_1 = (!__PYX_CYTHON_ATOMICS_ENABLED());
8033 3057 : if (__pyx_t_1) {
8034 :
8035 : /* "View.MemoryView":360
8036 : * if not __PYX_CYTHON_ATOMICS_ENABLED():
8037 : * global __pyx_memoryview_thread_locks_used
8038 : * if __pyx_memoryview_thread_locks_used < 8: # <<<<<<<<<<<<<<
8039 : * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
8040 : * __pyx_memoryview_thread_locks_used += 1
8041 : */
8042 : __pyx_t_1 = (__pyx_memoryview_thread_locks_used < 8);
8043 : if (__pyx_t_1) {
8044 :
8045 : /* "View.MemoryView":361
8046 : * global __pyx_memoryview_thread_locks_used
8047 : * if __pyx_memoryview_thread_locks_used < 8:
8048 : * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] # <<<<<<<<<<<<<<
8049 : * __pyx_memoryview_thread_locks_used += 1
8050 : * if self.lock is NULL:
8051 : */
8052 : __pyx_v_self->lock = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]);
8053 :
8054 : /* "View.MemoryView":362
8055 : * if __pyx_memoryview_thread_locks_used < 8:
8056 : * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
8057 : * __pyx_memoryview_thread_locks_used += 1 # <<<<<<<<<<<<<<
8058 : * if self.lock is NULL:
8059 : * self.lock = PyThread_allocate_lock()
8060 : */
8061 : __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used + 1);
8062 :
8063 : /* "View.MemoryView":360
8064 : * if not __PYX_CYTHON_ATOMICS_ENABLED():
8065 : * global __pyx_memoryview_thread_locks_used
8066 : * if __pyx_memoryview_thread_locks_used < 8: # <<<<<<<<<<<<<<
8067 : * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
8068 : * __pyx_memoryview_thread_locks_used += 1
8069 : */
8070 : }
8071 :
8072 : /* "View.MemoryView":363
8073 : * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
8074 : * __pyx_memoryview_thread_locks_used += 1
8075 : * if self.lock is NULL: # <<<<<<<<<<<<<<
8076 : * self.lock = PyThread_allocate_lock()
8077 : * if self.lock is NULL:
8078 : */
8079 : __pyx_t_1 = (__pyx_v_self->lock == NULL);
8080 : if (__pyx_t_1) {
8081 :
8082 : /* "View.MemoryView":364
8083 : * __pyx_memoryview_thread_locks_used += 1
8084 : * if self.lock is NULL:
8085 : * self.lock = PyThread_allocate_lock() # <<<<<<<<<<<<<<
8086 : * if self.lock is NULL:
8087 : * raise MemoryError
8088 : */
8089 : __pyx_v_self->lock = PyThread_allocate_lock();
8090 :
8091 : /* "View.MemoryView":365
8092 : * if self.lock is NULL:
8093 : * self.lock = PyThread_allocate_lock()
8094 : * if self.lock is NULL: # <<<<<<<<<<<<<<
8095 : * raise MemoryError
8096 : *
8097 : */
8098 : __pyx_t_1 = (__pyx_v_self->lock == NULL);
8099 : if (unlikely(__pyx_t_1)) {
8100 :
8101 : /* "View.MemoryView":366
8102 : * self.lock = PyThread_allocate_lock()
8103 : * if self.lock is NULL:
8104 : * raise MemoryError # <<<<<<<<<<<<<<
8105 : *
8106 : * if flags & PyBUF_FORMAT:
8107 : */
8108 : PyErr_NoMemory(); __PYX_ERR(1, 366, __pyx_L1_error)
8109 :
8110 : /* "View.MemoryView":365
8111 : * if self.lock is NULL:
8112 : * self.lock = PyThread_allocate_lock()
8113 : * if self.lock is NULL: # <<<<<<<<<<<<<<
8114 : * raise MemoryError
8115 : *
8116 : */
8117 : }
8118 :
8119 : /* "View.MemoryView":363
8120 : * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
8121 : * __pyx_memoryview_thread_locks_used += 1
8122 : * if self.lock is NULL: # <<<<<<<<<<<<<<
8123 : * self.lock = PyThread_allocate_lock()
8124 : * if self.lock is NULL:
8125 : */
8126 : }
8127 :
8128 : /* "View.MemoryView":358
8129 : * Py_INCREF(Py_None)
8130 : *
8131 : * if not __PYX_CYTHON_ATOMICS_ENABLED(): # <<<<<<<<<<<<<<
8132 : * global __pyx_memoryview_thread_locks_used
8133 : * if __pyx_memoryview_thread_locks_used < 8:
8134 : */
8135 : }
8136 :
8137 : /* "View.MemoryView":368
8138 : * raise MemoryError
8139 : *
8140 : * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
8141 : * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
8142 : * else:
8143 : */
8144 3057 : __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
8145 3057 : if (__pyx_t_1) {
8146 :
8147 : /* "View.MemoryView":369
8148 : *
8149 : * if flags & PyBUF_FORMAT:
8150 : * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0') # <<<<<<<<<<<<<<
8151 : * else:
8152 : * self.dtype_is_object = dtype_is_object
8153 : */
8154 3057 : __pyx_t_2 = ((__pyx_v_self->view.format[0]) == 'O');
8155 3057 : if (__pyx_t_2) {
8156 0 : } else {
8157 3057 : __pyx_t_1 = __pyx_t_2;
8158 3057 : goto __pyx_L12_bool_binop_done;
8159 : }
8160 0 : __pyx_t_2 = ((__pyx_v_self->view.format[1]) == '\x00');
8161 0 : __pyx_t_1 = __pyx_t_2;
8162 3057 : __pyx_L12_bool_binop_done:;
8163 3057 : __pyx_v_self->dtype_is_object = __pyx_t_1;
8164 :
8165 : /* "View.MemoryView":368
8166 : * raise MemoryError
8167 : *
8168 : * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
8169 : * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
8170 : * else:
8171 : */
8172 3057 : goto __pyx_L11;
8173 : }
8174 :
8175 : /* "View.MemoryView":371
8176 : * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
8177 : * else:
8178 : * self.dtype_is_object = dtype_is_object # <<<<<<<<<<<<<<
8179 : *
8180 : * assert <Py_intptr_t><void*>(&self.acquisition_count) % sizeof(__pyx_atomic_int_type) == 0
8181 : */
8182 : /*else*/ {
8183 0 : __pyx_v_self->dtype_is_object = __pyx_v_dtype_is_object;
8184 : }
8185 3057 : __pyx_L11:;
8186 :
8187 : /* "View.MemoryView":373
8188 : * self.dtype_is_object = dtype_is_object
8189 : *
8190 : * assert <Py_intptr_t><void*>(&self.acquisition_count) % sizeof(__pyx_atomic_int_type) == 0 # <<<<<<<<<<<<<<
8191 : * self.typeinfo = NULL
8192 : *
8193 : */
8194 : #ifndef CYTHON_WITHOUT_ASSERTIONS
8195 3057 : if (unlikely(__pyx_assertions_enabled())) {
8196 3057 : __pyx_t_4 = ((Py_intptr_t)((void *)(&__pyx_v_self->acquisition_count)));
8197 3057 : __pyx_t_5 = (sizeof(__pyx_atomic_int_type));
8198 3057 : if (unlikely(__pyx_t_5 == 0)) {
8199 : PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
8200 : __PYX_ERR(1, 373, __pyx_L1_error)
8201 : }
8202 3057 : __pyx_t_1 = ((__pyx_t_4 % __pyx_t_5) == 0);
8203 3057 : if (unlikely(!__pyx_t_1)) {
8204 0 : __Pyx_Raise(__pyx_builtin_AssertionError, 0, 0, 0);
8205 0 : __PYX_ERR(1, 373, __pyx_L1_error)
8206 : }
8207 : }
8208 : #else
8209 : if ((1)); else __PYX_ERR(1, 373, __pyx_L1_error)
8210 : #endif
8211 :
8212 : /* "View.MemoryView":374
8213 : *
8214 : * assert <Py_intptr_t><void*>(&self.acquisition_count) % sizeof(__pyx_atomic_int_type) == 0
8215 : * self.typeinfo = NULL # <<<<<<<<<<<<<<
8216 : *
8217 : * def __dealloc__(memoryview self):
8218 : */
8219 3057 : __pyx_v_self->typeinfo = NULL;
8220 :
8221 : /* "View.MemoryView":349
8222 : * cdef __Pyx_TypeInfo *typeinfo
8223 : *
8224 : * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False): # <<<<<<<<<<<<<<
8225 : * self.obj = obj
8226 : * self.flags = flags
8227 : */
8228 :
8229 : /* function exit code */
8230 3057 : __pyx_r = 0;
8231 3057 : goto __pyx_L0;
8232 0 : __pyx_L1_error:;
8233 0 : __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8234 0 : __pyx_r = -1;
8235 3057 : __pyx_L0:;
8236 3057 : __Pyx_RefNannyFinishContext();
8237 3057 : return __pyx_r;
8238 : }
8239 :
8240 : /* "View.MemoryView":376
8241 : * self.typeinfo = NULL
8242 : *
8243 : * def __dealloc__(memoryview self): # <<<<<<<<<<<<<<
8244 : * if self.obj is not None:
8245 : * __Pyx_ReleaseBuffer(&self.view)
8246 : */
8247 :
8248 : /* Python wrapper */
8249 : static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self); /*proto*/
8250 3057 : static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self) {
8251 3057 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
8252 : __Pyx_RefNannyDeclarations
8253 3057 : __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
8254 3057 : __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
8255 3057 : __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(((struct __pyx_memoryview_obj *)__pyx_v_self));
8256 :
8257 : /* function exit code */
8258 3057 : __Pyx_RefNannyFinishContext();
8259 : }
8260 :
8261 3057 : static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self) {
8262 3057 : int __pyx_v_i;
8263 3057 : int __pyx_t_1;
8264 3057 : int __pyx_t_2;
8265 3057 : int __pyx_t_3;
8266 3057 : int __pyx_t_4;
8267 3057 : PyThread_type_lock __pyx_t_5;
8268 3057 : PyThread_type_lock __pyx_t_6;
8269 :
8270 : /* "View.MemoryView":377
8271 : *
8272 : * def __dealloc__(memoryview self):
8273 : * if self.obj is not None: # <<<<<<<<<<<<<<
8274 : * __Pyx_ReleaseBuffer(&self.view)
8275 : * elif (<__pyx_buffer *> &self.view).obj == Py_None:
8276 : */
8277 3057 : __pyx_t_1 = (__pyx_v_self->obj != Py_None);
8278 3057 : if (__pyx_t_1) {
8279 :
8280 : /* "View.MemoryView":378
8281 : * def __dealloc__(memoryview self):
8282 : * if self.obj is not None:
8283 : * __Pyx_ReleaseBuffer(&self.view) # <<<<<<<<<<<<<<
8284 : * elif (<__pyx_buffer *> &self.view).obj == Py_None:
8285 : *
8286 : */
8287 3057 : __Pyx_ReleaseBuffer((&__pyx_v_self->view));
8288 :
8289 : /* "View.MemoryView":377
8290 : *
8291 : * def __dealloc__(memoryview self):
8292 : * if self.obj is not None: # <<<<<<<<<<<<<<
8293 : * __Pyx_ReleaseBuffer(&self.view)
8294 : * elif (<__pyx_buffer *> &self.view).obj == Py_None:
8295 : */
8296 3057 : goto __pyx_L3;
8297 : }
8298 :
8299 : /* "View.MemoryView":379
8300 : * if self.obj is not None:
8301 : * __Pyx_ReleaseBuffer(&self.view)
8302 : * elif (<__pyx_buffer *> &self.view).obj == Py_None: # <<<<<<<<<<<<<<
8303 : *
8304 : * (<__pyx_buffer *> &self.view).obj = NULL
8305 : */
8306 0 : __pyx_t_1 = (((Py_buffer *)(&__pyx_v_self->view))->obj == Py_None);
8307 0 : if (__pyx_t_1) {
8308 :
8309 : /* "View.MemoryView":381
8310 : * elif (<__pyx_buffer *> &self.view).obj == Py_None:
8311 : *
8312 : * (<__pyx_buffer *> &self.view).obj = NULL # <<<<<<<<<<<<<<
8313 : * Py_DECREF(Py_None)
8314 : *
8315 : */
8316 0 : ((Py_buffer *)(&__pyx_v_self->view))->obj = NULL;
8317 :
8318 : /* "View.MemoryView":382
8319 : *
8320 : * (<__pyx_buffer *> &self.view).obj = NULL
8321 : * Py_DECREF(Py_None) # <<<<<<<<<<<<<<
8322 : *
8323 : * cdef int i
8324 : */
8325 0 : Py_DECREF(Py_None);
8326 :
8327 : /* "View.MemoryView":379
8328 : * if self.obj is not None:
8329 : * __Pyx_ReleaseBuffer(&self.view)
8330 : * elif (<__pyx_buffer *> &self.view).obj == Py_None: # <<<<<<<<<<<<<<
8331 : *
8332 : * (<__pyx_buffer *> &self.view).obj = NULL
8333 : */
8334 : }
8335 0 : __pyx_L3:;
8336 :
8337 : /* "View.MemoryView":386
8338 : * cdef int i
8339 : * global __pyx_memoryview_thread_locks_used
8340 : * if self.lock != NULL: # <<<<<<<<<<<<<<
8341 : * for i in range(__pyx_memoryview_thread_locks_used):
8342 : * if __pyx_memoryview_thread_locks[i] is self.lock:
8343 : */
8344 3057 : __pyx_t_1 = (__pyx_v_self->lock != NULL);
8345 3057 : if (__pyx_t_1) {
8346 :
8347 : /* "View.MemoryView":387
8348 : * global __pyx_memoryview_thread_locks_used
8349 : * if self.lock != NULL:
8350 : * for i in range(__pyx_memoryview_thread_locks_used): # <<<<<<<<<<<<<<
8351 : * if __pyx_memoryview_thread_locks[i] is self.lock:
8352 : * __pyx_memoryview_thread_locks_used -= 1
8353 : */
8354 0 : __pyx_t_2 = __pyx_memoryview_thread_locks_used;
8355 0 : __pyx_t_3 = __pyx_t_2;
8356 0 : for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
8357 0 : __pyx_v_i = __pyx_t_4;
8358 :
8359 : /* "View.MemoryView":388
8360 : * if self.lock != NULL:
8361 : * for i in range(__pyx_memoryview_thread_locks_used):
8362 : * if __pyx_memoryview_thread_locks[i] is self.lock: # <<<<<<<<<<<<<<
8363 : * __pyx_memoryview_thread_locks_used -= 1
8364 : * if i != __pyx_memoryview_thread_locks_used:
8365 : */
8366 0 : __pyx_t_1 = ((__pyx_memoryview_thread_locks[__pyx_v_i]) == __pyx_v_self->lock);
8367 0 : if (__pyx_t_1) {
8368 :
8369 : /* "View.MemoryView":389
8370 : * for i in range(__pyx_memoryview_thread_locks_used):
8371 : * if __pyx_memoryview_thread_locks[i] is self.lock:
8372 : * __pyx_memoryview_thread_locks_used -= 1 # <<<<<<<<<<<<<<
8373 : * if i != __pyx_memoryview_thread_locks_used:
8374 : * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
8375 : */
8376 0 : __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used - 1);
8377 :
8378 : /* "View.MemoryView":390
8379 : * if __pyx_memoryview_thread_locks[i] is self.lock:
8380 : * __pyx_memoryview_thread_locks_used -= 1
8381 : * if i != __pyx_memoryview_thread_locks_used: # <<<<<<<<<<<<<<
8382 : * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
8383 : * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
8384 : */
8385 0 : __pyx_t_1 = (__pyx_v_i != __pyx_memoryview_thread_locks_used);
8386 0 : if (__pyx_t_1) {
8387 :
8388 : /* "View.MemoryView":392
8389 : * if i != __pyx_memoryview_thread_locks_used:
8390 : * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
8391 : * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i]) # <<<<<<<<<<<<<<
8392 : * break
8393 : * else:
8394 : */
8395 0 : __pyx_t_5 = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]);
8396 0 : __pyx_t_6 = (__pyx_memoryview_thread_locks[__pyx_v_i]);
8397 :
8398 : /* "View.MemoryView":391
8399 : * __pyx_memoryview_thread_locks_used -= 1
8400 : * if i != __pyx_memoryview_thread_locks_used:
8401 : * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = ( # <<<<<<<<<<<<<<
8402 : * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
8403 : * break
8404 : */
8405 0 : (__pyx_memoryview_thread_locks[__pyx_v_i]) = __pyx_t_5;
8406 0 : (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]) = __pyx_t_6;
8407 :
8408 : /* "View.MemoryView":390
8409 : * if __pyx_memoryview_thread_locks[i] is self.lock:
8410 : * __pyx_memoryview_thread_locks_used -= 1
8411 : * if i != __pyx_memoryview_thread_locks_used: # <<<<<<<<<<<<<<
8412 : * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
8413 : * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
8414 : */
8415 : }
8416 :
8417 : /* "View.MemoryView":393
8418 : * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
8419 : * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
8420 : * break # <<<<<<<<<<<<<<
8421 : * else:
8422 : * PyThread_free_lock(self.lock)
8423 : */
8424 0 : goto __pyx_L6_break;
8425 :
8426 : /* "View.MemoryView":388
8427 : * if self.lock != NULL:
8428 : * for i in range(__pyx_memoryview_thread_locks_used):
8429 : * if __pyx_memoryview_thread_locks[i] is self.lock: # <<<<<<<<<<<<<<
8430 : * __pyx_memoryview_thread_locks_used -= 1
8431 : * if i != __pyx_memoryview_thread_locks_used:
8432 : */
8433 : }
8434 : }
8435 : /*else*/ {
8436 :
8437 : /* "View.MemoryView":395
8438 : * break
8439 : * else:
8440 : * PyThread_free_lock(self.lock) # <<<<<<<<<<<<<<
8441 : *
8442 : * cdef char *get_item_pointer(memoryview self, object index) except NULL:
8443 : */
8444 0 : PyThread_free_lock(__pyx_v_self->lock);
8445 : }
8446 3057 : __pyx_L6_break:;
8447 :
8448 : /* "View.MemoryView":386
8449 : * cdef int i
8450 : * global __pyx_memoryview_thread_locks_used
8451 : * if self.lock != NULL: # <<<<<<<<<<<<<<
8452 : * for i in range(__pyx_memoryview_thread_locks_used):
8453 : * if __pyx_memoryview_thread_locks[i] is self.lock:
8454 : */
8455 : }
8456 :
8457 : /* "View.MemoryView":376
8458 : * self.typeinfo = NULL
8459 : *
8460 : * def __dealloc__(memoryview self): # <<<<<<<<<<<<<<
8461 : * if self.obj is not None:
8462 : * __Pyx_ReleaseBuffer(&self.view)
8463 : */
8464 :
8465 : /* function exit code */
8466 3057 : }
8467 :
8468 : /* "View.MemoryView":397
8469 : * PyThread_free_lock(self.lock)
8470 : *
8471 : * cdef char *get_item_pointer(memoryview self, object index) except NULL: # <<<<<<<<<<<<<<
8472 : * cdef Py_ssize_t dim
8473 : * cdef char *itemp = <char *> self.view.buf
8474 : */
8475 :
8476 0 : static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) {
8477 0 : Py_ssize_t __pyx_v_dim;
8478 0 : char *__pyx_v_itemp;
8479 0 : PyObject *__pyx_v_idx = NULL;
8480 0 : char *__pyx_r;
8481 : __Pyx_RefNannyDeclarations
8482 0 : Py_ssize_t __pyx_t_1;
8483 0 : PyObject *__pyx_t_2 = NULL;
8484 0 : Py_ssize_t __pyx_t_3;
8485 0 : PyObject *(*__pyx_t_4)(PyObject *);
8486 0 : PyObject *__pyx_t_5 = NULL;
8487 0 : Py_ssize_t __pyx_t_6;
8488 0 : char *__pyx_t_7;
8489 0 : int __pyx_lineno = 0;
8490 0 : const char *__pyx_filename = NULL;
8491 0 : int __pyx_clineno = 0;
8492 0 : __Pyx_RefNannySetupContext("get_item_pointer", 1);
8493 :
8494 : /* "View.MemoryView":399
8495 : * cdef char *get_item_pointer(memoryview self, object index) except NULL:
8496 : * cdef Py_ssize_t dim
8497 : * cdef char *itemp = <char *> self.view.buf # <<<<<<<<<<<<<<
8498 : *
8499 : * for dim, idx in enumerate(index):
8500 : */
8501 0 : __pyx_v_itemp = ((char *)__pyx_v_self->view.buf);
8502 :
8503 : /* "View.MemoryView":401
8504 : * cdef char *itemp = <char *> self.view.buf
8505 : *
8506 : * for dim, idx in enumerate(index): # <<<<<<<<<<<<<<
8507 : * itemp = pybuffer_index(&self.view, itemp, idx, dim)
8508 : *
8509 : */
8510 0 : __pyx_t_1 = 0;
8511 0 : if (likely(PyList_CheckExact(__pyx_v_index)) || PyTuple_CheckExact(__pyx_v_index)) {
8512 0 : __pyx_t_2 = __pyx_v_index; __Pyx_INCREF(__pyx_t_2);
8513 0 : __pyx_t_3 = 0;
8514 0 : __pyx_t_4 = NULL;
8515 : } else {
8516 0 : __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 401, __pyx_L1_error)
8517 0 : __Pyx_GOTREF(__pyx_t_2);
8518 0 : __pyx_t_4 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 401, __pyx_L1_error)
8519 : }
8520 0 : for (;;) {
8521 0 : if (likely(!__pyx_t_4)) {
8522 0 : if (likely(PyList_CheckExact(__pyx_t_2))) {
8523 : {
8524 0 : Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
8525 : #if !CYTHON_ASSUME_SAFE_MACROS
8526 : if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 401, __pyx_L1_error)
8527 : #endif
8528 0 : if (__pyx_t_3 >= __pyx_temp) break;
8529 : }
8530 : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
8531 0 : __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(1, 401, __pyx_L1_error)
8532 : #else
8533 : __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 401, __pyx_L1_error)
8534 : __Pyx_GOTREF(__pyx_t_5);
8535 : #endif
8536 : } else {
8537 : {
8538 0 : Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
8539 : #if !CYTHON_ASSUME_SAFE_MACROS
8540 : if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 401, __pyx_L1_error)
8541 : #endif
8542 0 : if (__pyx_t_3 >= __pyx_temp) break;
8543 : }
8544 : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
8545 0 : __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(1, 401, __pyx_L1_error)
8546 : #else
8547 : __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 401, __pyx_L1_error)
8548 : __Pyx_GOTREF(__pyx_t_5);
8549 : #endif
8550 : }
8551 : } else {
8552 0 : __pyx_t_5 = __pyx_t_4(__pyx_t_2);
8553 0 : if (unlikely(!__pyx_t_5)) {
8554 0 : PyObject* exc_type = PyErr_Occurred();
8555 0 : if (exc_type) {
8556 0 : if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
8557 0 : else __PYX_ERR(1, 401, __pyx_L1_error)
8558 : }
8559 : break;
8560 : }
8561 0 : __Pyx_GOTREF(__pyx_t_5);
8562 : }
8563 0 : __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_5);
8564 0 : __pyx_t_5 = 0;
8565 0 : __pyx_v_dim = __pyx_t_1;
8566 0 : __pyx_t_1 = (__pyx_t_1 + 1);
8567 :
8568 : /* "View.MemoryView":402
8569 : *
8570 : * for dim, idx in enumerate(index):
8571 : * itemp = pybuffer_index(&self.view, itemp, idx, dim) # <<<<<<<<<<<<<<
8572 : *
8573 : * return itemp
8574 : */
8575 0 : __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 402, __pyx_L1_error)
8576 0 : __pyx_t_7 = __pyx_pybuffer_index((&__pyx_v_self->view), __pyx_v_itemp, __pyx_t_6, __pyx_v_dim); if (unlikely(__pyx_t_7 == ((char *)NULL))) __PYX_ERR(1, 402, __pyx_L1_error)
8577 : __pyx_v_itemp = __pyx_t_7;
8578 :
8579 : /* "View.MemoryView":401
8580 : * cdef char *itemp = <char *> self.view.buf
8581 : *
8582 : * for dim, idx in enumerate(index): # <<<<<<<<<<<<<<
8583 : * itemp = pybuffer_index(&self.view, itemp, idx, dim)
8584 : *
8585 : */
8586 : }
8587 0 : __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8588 :
8589 : /* "View.MemoryView":404
8590 : * itemp = pybuffer_index(&self.view, itemp, idx, dim)
8591 : *
8592 : * return itemp # <<<<<<<<<<<<<<
8593 : *
8594 : *
8595 : */
8596 0 : __pyx_r = __pyx_v_itemp;
8597 0 : goto __pyx_L0;
8598 :
8599 : /* "View.MemoryView":397
8600 : * PyThread_free_lock(self.lock)
8601 : *
8602 : * cdef char *get_item_pointer(memoryview self, object index) except NULL: # <<<<<<<<<<<<<<
8603 : * cdef Py_ssize_t dim
8604 : * cdef char *itemp = <char *> self.view.buf
8605 : */
8606 :
8607 : /* function exit code */
8608 0 : __pyx_L1_error:;
8609 0 : __Pyx_XDECREF(__pyx_t_2);
8610 0 : __Pyx_XDECREF(__pyx_t_5);
8611 0 : __Pyx_AddTraceback("View.MemoryView.memoryview.get_item_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename);
8612 0 : __pyx_r = NULL;
8613 0 : __pyx_L0:;
8614 0 : __Pyx_XDECREF(__pyx_v_idx);
8615 0 : __Pyx_RefNannyFinishContext();
8616 0 : return __pyx_r;
8617 : }
8618 :
8619 : /* "View.MemoryView":407
8620 : *
8621 : *
8622 : * def __getitem__(memoryview self, object index): # <<<<<<<<<<<<<<
8623 : * if index is Ellipsis:
8624 : * return self
8625 : */
8626 :
8627 : /* Python wrapper */
8628 : static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/
8629 0 : static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
8630 0 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
8631 0 : PyObject *__pyx_r = 0;
8632 : __Pyx_RefNannyDeclarations
8633 0 : __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
8634 0 : __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
8635 0 : __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index));
8636 :
8637 : /* function exit code */
8638 0 : __Pyx_RefNannyFinishContext();
8639 0 : return __pyx_r;
8640 : }
8641 :
8642 0 : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) {
8643 0 : PyObject *__pyx_v_have_slices = NULL;
8644 0 : PyObject *__pyx_v_indices = NULL;
8645 0 : char *__pyx_v_itemp;
8646 0 : PyObject *__pyx_r = NULL;
8647 : __Pyx_RefNannyDeclarations
8648 0 : int __pyx_t_1;
8649 0 : PyObject *__pyx_t_2 = NULL;
8650 0 : PyObject *__pyx_t_3 = NULL;
8651 0 : PyObject *__pyx_t_4 = NULL;
8652 0 : char *__pyx_t_5;
8653 0 : int __pyx_lineno = 0;
8654 0 : const char *__pyx_filename = NULL;
8655 0 : int __pyx_clineno = 0;
8656 0 : __Pyx_RefNannySetupContext("__getitem__", 1);
8657 :
8658 : /* "View.MemoryView":408
8659 : *
8660 : * def __getitem__(memoryview self, object index):
8661 : * if index is Ellipsis: # <<<<<<<<<<<<<<
8662 : * return self
8663 : *
8664 : */
8665 0 : __pyx_t_1 = (__pyx_v_index == __pyx_builtin_Ellipsis);
8666 0 : if (__pyx_t_1) {
8667 :
8668 : /* "View.MemoryView":409
8669 : * def __getitem__(memoryview self, object index):
8670 : * if index is Ellipsis:
8671 : * return self # <<<<<<<<<<<<<<
8672 : *
8673 : * have_slices, indices = _unellipsify(index, self.view.ndim)
8674 : */
8675 0 : __Pyx_XDECREF(__pyx_r);
8676 0 : __Pyx_INCREF((PyObject *)__pyx_v_self);
8677 0 : __pyx_r = ((PyObject *)__pyx_v_self);
8678 0 : goto __pyx_L0;
8679 :
8680 : /* "View.MemoryView":408
8681 : *
8682 : * def __getitem__(memoryview self, object index):
8683 : * if index is Ellipsis: # <<<<<<<<<<<<<<
8684 : * return self
8685 : *
8686 : */
8687 : }
8688 :
8689 : /* "View.MemoryView":411
8690 : * return self
8691 : *
8692 : * have_slices, indices = _unellipsify(index, self.view.ndim) # <<<<<<<<<<<<<<
8693 : *
8694 : * cdef char *itemp
8695 : */
8696 0 : __pyx_t_2 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 411, __pyx_L1_error)
8697 0 : __Pyx_GOTREF(__pyx_t_2);
8698 0 : if (likely(__pyx_t_2 != Py_None)) {
8699 0 : PyObject* sequence = __pyx_t_2;
8700 0 : Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
8701 0 : if (unlikely(size != 2)) {
8702 0 : if (size > 2) __Pyx_RaiseTooManyValuesError(2);
8703 0 : else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
8704 0 : __PYX_ERR(1, 411, __pyx_L1_error)
8705 : }
8706 : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
8707 0 : __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
8708 0 : __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
8709 0 : __Pyx_INCREF(__pyx_t_3);
8710 0 : __Pyx_INCREF(__pyx_t_4);
8711 : #else
8712 : __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 411, __pyx_L1_error)
8713 : __Pyx_GOTREF(__pyx_t_3);
8714 : __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 411, __pyx_L1_error)
8715 : __Pyx_GOTREF(__pyx_t_4);
8716 : #endif
8717 0 : __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8718 : } else {
8719 0 : __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 411, __pyx_L1_error)
8720 : }
8721 0 : __pyx_v_have_slices = __pyx_t_3;
8722 0 : __pyx_t_3 = 0;
8723 0 : __pyx_v_indices = __pyx_t_4;
8724 0 : __pyx_t_4 = 0;
8725 :
8726 : /* "View.MemoryView":414
8727 : *
8728 : * cdef char *itemp
8729 : * if have_slices: # <<<<<<<<<<<<<<
8730 : * return memview_slice(self, indices)
8731 : * else:
8732 : */
8733 0 : __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 414, __pyx_L1_error)
8734 0 : if (__pyx_t_1) {
8735 :
8736 : /* "View.MemoryView":415
8737 : * cdef char *itemp
8738 : * if have_slices:
8739 : * return memview_slice(self, indices) # <<<<<<<<<<<<<<
8740 : * else:
8741 : * itemp = self.get_item_pointer(indices)
8742 : */
8743 0 : __Pyx_XDECREF(__pyx_r);
8744 0 : __pyx_t_2 = ((PyObject *)__pyx_memview_slice(__pyx_v_self, __pyx_v_indices)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 415, __pyx_L1_error)
8745 0 : __Pyx_GOTREF(__pyx_t_2);
8746 0 : __pyx_r = __pyx_t_2;
8747 0 : __pyx_t_2 = 0;
8748 0 : goto __pyx_L0;
8749 :
8750 : /* "View.MemoryView":414
8751 : *
8752 : * cdef char *itemp
8753 : * if have_slices: # <<<<<<<<<<<<<<
8754 : * return memview_slice(self, indices)
8755 : * else:
8756 : */
8757 : }
8758 :
8759 : /* "View.MemoryView":417
8760 : * return memview_slice(self, indices)
8761 : * else:
8762 : * itemp = self.get_item_pointer(indices) # <<<<<<<<<<<<<<
8763 : * return self.convert_item_to_object(itemp)
8764 : *
8765 : */
8766 : /*else*/ {
8767 0 : __pyx_t_5 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_indices); if (unlikely(__pyx_t_5 == ((char *)NULL))) __PYX_ERR(1, 417, __pyx_L1_error)
8768 0 : __pyx_v_itemp = __pyx_t_5;
8769 :
8770 : /* "View.MemoryView":418
8771 : * else:
8772 : * itemp = self.get_item_pointer(indices)
8773 : * return self.convert_item_to_object(itemp) # <<<<<<<<<<<<<<
8774 : *
8775 : * def __setitem__(memoryview self, object index, object value):
8776 : */
8777 0 : __Pyx_XDECREF(__pyx_r);
8778 0 : __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->convert_item_to_object(__pyx_v_self, __pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 418, __pyx_L1_error)
8779 0 : __Pyx_GOTREF(__pyx_t_2);
8780 0 : __pyx_r = __pyx_t_2;
8781 0 : __pyx_t_2 = 0;
8782 0 : goto __pyx_L0;
8783 : }
8784 :
8785 : /* "View.MemoryView":407
8786 : *
8787 : *
8788 : * def __getitem__(memoryview self, object index): # <<<<<<<<<<<<<<
8789 : * if index is Ellipsis:
8790 : * return self
8791 : */
8792 :
8793 : /* function exit code */
8794 0 : __pyx_L1_error:;
8795 0 : __Pyx_XDECREF(__pyx_t_2);
8796 0 : __Pyx_XDECREF(__pyx_t_3);
8797 0 : __Pyx_XDECREF(__pyx_t_4);
8798 0 : __Pyx_AddTraceback("View.MemoryView.memoryview.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8799 0 : __pyx_r = NULL;
8800 0 : __pyx_L0:;
8801 0 : __Pyx_XDECREF(__pyx_v_have_slices);
8802 0 : __Pyx_XDECREF(__pyx_v_indices);
8803 0 : __Pyx_XGIVEREF(__pyx_r);
8804 0 : __Pyx_RefNannyFinishContext();
8805 0 : return __pyx_r;
8806 : }
8807 :
8808 : /* "View.MemoryView":420
8809 : * return self.convert_item_to_object(itemp)
8810 : *
8811 : * def __setitem__(memoryview self, object index, object value): # <<<<<<<<<<<<<<
8812 : * if self.view.readonly:
8813 : * raise TypeError, "Cannot assign to read-only memoryview"
8814 : */
8815 :
8816 : /* Python wrapper */
8817 : static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /*proto*/
8818 0 : static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
8819 0 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
8820 0 : int __pyx_r;
8821 : __Pyx_RefNannyDeclarations
8822 0 : __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
8823 0 : __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
8824 0 : __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index), ((PyObject *)__pyx_v_value));
8825 :
8826 : /* function exit code */
8827 0 : __Pyx_RefNannyFinishContext();
8828 0 : return __pyx_r;
8829 : }
8830 :
8831 0 : static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
8832 0 : PyObject *__pyx_v_have_slices = NULL;
8833 0 : PyObject *__pyx_v_obj = NULL;
8834 0 : int __pyx_r;
8835 : __Pyx_RefNannyDeclarations
8836 0 : PyObject *__pyx_t_1 = NULL;
8837 0 : PyObject *__pyx_t_2 = NULL;
8838 0 : PyObject *__pyx_t_3 = NULL;
8839 0 : int __pyx_t_4;
8840 0 : int __pyx_lineno = 0;
8841 0 : const char *__pyx_filename = NULL;
8842 0 : int __pyx_clineno = 0;
8843 0 : __Pyx_RefNannySetupContext("__setitem__", 0);
8844 0 : __Pyx_INCREF(__pyx_v_index);
8845 :
8846 : /* "View.MemoryView":421
8847 : *
8848 : * def __setitem__(memoryview self, object index, object value):
8849 : * if self.view.readonly: # <<<<<<<<<<<<<<
8850 : * raise TypeError, "Cannot assign to read-only memoryview"
8851 : *
8852 : */
8853 0 : if (unlikely(__pyx_v_self->view.readonly)) {
8854 :
8855 : /* "View.MemoryView":422
8856 : * def __setitem__(memoryview self, object index, object value):
8857 : * if self.view.readonly:
8858 : * raise TypeError, "Cannot assign to read-only memoryview" # <<<<<<<<<<<<<<
8859 : *
8860 : * have_slices, index = _unellipsify(index, self.view.ndim)
8861 : */
8862 0 : __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_Cannot_assign_to_read_only_memor, 0, 0);
8863 0 : __PYX_ERR(1, 422, __pyx_L1_error)
8864 :
8865 : /* "View.MemoryView":421
8866 : *
8867 : * def __setitem__(memoryview self, object index, object value):
8868 : * if self.view.readonly: # <<<<<<<<<<<<<<
8869 : * raise TypeError, "Cannot assign to read-only memoryview"
8870 : *
8871 : */
8872 : }
8873 :
8874 : /* "View.MemoryView":424
8875 : * raise TypeError, "Cannot assign to read-only memoryview"
8876 : *
8877 : * have_slices, index = _unellipsify(index, self.view.ndim) # <<<<<<<<<<<<<<
8878 : *
8879 : * if have_slices:
8880 : */
8881 0 : __pyx_t_1 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 424, __pyx_L1_error)
8882 0 : __Pyx_GOTREF(__pyx_t_1);
8883 0 : if (likely(__pyx_t_1 != Py_None)) {
8884 0 : PyObject* sequence = __pyx_t_1;
8885 0 : Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
8886 0 : if (unlikely(size != 2)) {
8887 0 : if (size > 2) __Pyx_RaiseTooManyValuesError(2);
8888 0 : else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
8889 0 : __PYX_ERR(1, 424, __pyx_L1_error)
8890 : }
8891 : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
8892 0 : __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
8893 0 : __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1);
8894 0 : __Pyx_INCREF(__pyx_t_2);
8895 0 : __Pyx_INCREF(__pyx_t_3);
8896 : #else
8897 : __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 424, __pyx_L1_error)
8898 : __Pyx_GOTREF(__pyx_t_2);
8899 : __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 424, __pyx_L1_error)
8900 : __Pyx_GOTREF(__pyx_t_3);
8901 : #endif
8902 0 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8903 : } else {
8904 0 : __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 424, __pyx_L1_error)
8905 : }
8906 0 : __pyx_v_have_slices = __pyx_t_2;
8907 0 : __pyx_t_2 = 0;
8908 0 : __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_3);
8909 0 : __pyx_t_3 = 0;
8910 :
8911 : /* "View.MemoryView":426
8912 : * have_slices, index = _unellipsify(index, self.view.ndim)
8913 : *
8914 : * if have_slices: # <<<<<<<<<<<<<<
8915 : * obj = self.is_slice(value)
8916 : * if obj is not None:
8917 : */
8918 0 : __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(1, 426, __pyx_L1_error)
8919 0 : if (__pyx_t_4) {
8920 :
8921 : /* "View.MemoryView":427
8922 : *
8923 : * if have_slices:
8924 : * obj = self.is_slice(value) # <<<<<<<<<<<<<<
8925 : * if obj is not None:
8926 : * self.setitem_slice_assignment(self[index], obj)
8927 : */
8928 0 : __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->is_slice(__pyx_v_self, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 427, __pyx_L1_error)
8929 0 : __Pyx_GOTREF(__pyx_t_1);
8930 0 : __pyx_v_obj = __pyx_t_1;
8931 0 : __pyx_t_1 = 0;
8932 :
8933 : /* "View.MemoryView":428
8934 : * if have_slices:
8935 : * obj = self.is_slice(value)
8936 : * if obj is not None: # <<<<<<<<<<<<<<
8937 : * self.setitem_slice_assignment(self[index], obj)
8938 : * else:
8939 : */
8940 0 : __pyx_t_4 = (__pyx_v_obj != Py_None);
8941 0 : if (__pyx_t_4) {
8942 :
8943 : /* "View.MemoryView":429
8944 : * obj = self.is_slice(value)
8945 : * if obj is not None:
8946 : * self.setitem_slice_assignment(self[index], obj) # <<<<<<<<<<<<<<
8947 : * else:
8948 : * self.setitem_slice_assign_scalar(self[index], value)
8949 : */
8950 0 : __pyx_t_1 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 429, __pyx_L1_error)
8951 0 : __Pyx_GOTREF(__pyx_t_1);
8952 0 : __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assignment(__pyx_v_self, __pyx_t_1, __pyx_v_obj); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 429, __pyx_L1_error)
8953 0 : __Pyx_GOTREF(__pyx_t_3);
8954 0 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8955 0 : __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8956 :
8957 : /* "View.MemoryView":428
8958 : * if have_slices:
8959 : * obj = self.is_slice(value)
8960 : * if obj is not None: # <<<<<<<<<<<<<<
8961 : * self.setitem_slice_assignment(self[index], obj)
8962 : * else:
8963 : */
8964 0 : goto __pyx_L5;
8965 : }
8966 :
8967 : /* "View.MemoryView":431
8968 : * self.setitem_slice_assignment(self[index], obj)
8969 : * else:
8970 : * self.setitem_slice_assign_scalar(self[index], value) # <<<<<<<<<<<<<<
8971 : * else:
8972 : * self.setitem_indexed(index, value)
8973 : */
8974 : /*else*/ {
8975 0 : __pyx_t_3 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 431, __pyx_L1_error)
8976 0 : __Pyx_GOTREF(__pyx_t_3);
8977 0 : if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_memoryview_type))))) __PYX_ERR(1, 431, __pyx_L1_error)
8978 0 : __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assign_scalar(__pyx_v_self, ((struct __pyx_memoryview_obj *)__pyx_t_3), __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 431, __pyx_L1_error)
8979 0 : __Pyx_GOTREF(__pyx_t_1);
8980 0 : __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8981 0 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8982 : }
8983 0 : __pyx_L5:;
8984 :
8985 : /* "View.MemoryView":426
8986 : * have_slices, index = _unellipsify(index, self.view.ndim)
8987 : *
8988 : * if have_slices: # <<<<<<<<<<<<<<
8989 : * obj = self.is_slice(value)
8990 : * if obj is not None:
8991 : */
8992 0 : goto __pyx_L4;
8993 : }
8994 :
8995 : /* "View.MemoryView":433
8996 : * self.setitem_slice_assign_scalar(self[index], value)
8997 : * else:
8998 : * self.setitem_indexed(index, value) # <<<<<<<<<<<<<<
8999 : *
9000 : * cdef is_slice(self, obj):
9001 : */
9002 : /*else*/ {
9003 0 : __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_indexed(__pyx_v_self, __pyx_v_index, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 433, __pyx_L1_error)
9004 0 : __Pyx_GOTREF(__pyx_t_1);
9005 0 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9006 : }
9007 0 : __pyx_L4:;
9008 :
9009 : /* "View.MemoryView":420
9010 : * return self.convert_item_to_object(itemp)
9011 : *
9012 : * def __setitem__(memoryview self, object index, object value): # <<<<<<<<<<<<<<
9013 : * if self.view.readonly:
9014 : * raise TypeError, "Cannot assign to read-only memoryview"
9015 : */
9016 :
9017 : /* function exit code */
9018 0 : __pyx_r = 0;
9019 0 : goto __pyx_L0;
9020 0 : __pyx_L1_error:;
9021 0 : __Pyx_XDECREF(__pyx_t_1);
9022 0 : __Pyx_XDECREF(__pyx_t_2);
9023 0 : __Pyx_XDECREF(__pyx_t_3);
9024 0 : __Pyx_AddTraceback("View.MemoryView.memoryview.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9025 0 : __pyx_r = -1;
9026 0 : __pyx_L0:;
9027 0 : __Pyx_XDECREF(__pyx_v_have_slices);
9028 0 : __Pyx_XDECREF(__pyx_v_obj);
9029 0 : __Pyx_XDECREF(__pyx_v_index);
9030 0 : __Pyx_RefNannyFinishContext();
9031 0 : return __pyx_r;
9032 : }
9033 :
9034 : /* "View.MemoryView":435
9035 : * self.setitem_indexed(index, value)
9036 : *
9037 : * cdef is_slice(self, obj): # <<<<<<<<<<<<<<
9038 : * if not isinstance(obj, memoryview):
9039 : * try:
9040 : */
9041 :
9042 0 : static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj) {
9043 0 : PyObject *__pyx_r = NULL;
9044 : __Pyx_RefNannyDeclarations
9045 0 : int __pyx_t_1;
9046 0 : int __pyx_t_2;
9047 0 : PyObject *__pyx_t_3 = NULL;
9048 0 : PyObject *__pyx_t_4 = NULL;
9049 0 : PyObject *__pyx_t_5 = NULL;
9050 0 : PyObject *__pyx_t_6 = NULL;
9051 0 : PyObject *__pyx_t_7 = NULL;
9052 0 : PyObject *__pyx_t_8 = NULL;
9053 0 : int __pyx_t_9;
9054 0 : int __pyx_lineno = 0;
9055 0 : const char *__pyx_filename = NULL;
9056 0 : int __pyx_clineno = 0;
9057 0 : __Pyx_RefNannySetupContext("is_slice", 0);
9058 0 : __Pyx_INCREF(__pyx_v_obj);
9059 :
9060 : /* "View.MemoryView":436
9061 : *
9062 : * cdef is_slice(self, obj):
9063 : * if not isinstance(obj, memoryview): # <<<<<<<<<<<<<<
9064 : * try:
9065 : * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
9066 : */
9067 0 : __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_memoryview_type);
9068 0 : __pyx_t_2 = (!__pyx_t_1);
9069 0 : if (__pyx_t_2) {
9070 :
9071 : /* "View.MemoryView":437
9072 : * cdef is_slice(self, obj):
9073 : * if not isinstance(obj, memoryview):
9074 : * try: # <<<<<<<<<<<<<<
9075 : * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
9076 : * self.dtype_is_object)
9077 : */
9078 : {
9079 0 : __Pyx_PyThreadState_declare
9080 0 : __Pyx_PyThreadState_assign
9081 0 : __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
9082 0 : __Pyx_XGOTREF(__pyx_t_3);
9083 0 : __Pyx_XGOTREF(__pyx_t_4);
9084 0 : __Pyx_XGOTREF(__pyx_t_5);
9085 : /*try:*/ {
9086 :
9087 : /* "View.MemoryView":438
9088 : * if not isinstance(obj, memoryview):
9089 : * try:
9090 : * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, # <<<<<<<<<<<<<<
9091 : * self.dtype_is_object)
9092 : * except TypeError:
9093 : */
9094 0 : __pyx_t_6 = __Pyx_PyInt_From_int(((__pyx_v_self->flags & (~PyBUF_WRITABLE)) | PyBUF_ANY_CONTIGUOUS)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 438, __pyx_L4_error)
9095 0 : __Pyx_GOTREF(__pyx_t_6);
9096 :
9097 : /* "View.MemoryView":439
9098 : * try:
9099 : * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
9100 : * self.dtype_is_object) # <<<<<<<<<<<<<<
9101 : * except TypeError:
9102 : * return None
9103 : */
9104 0 : __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 439, __pyx_L4_error)
9105 0 : __Pyx_GOTREF(__pyx_t_7);
9106 :
9107 : /* "View.MemoryView":438
9108 : * if not isinstance(obj, memoryview):
9109 : * try:
9110 : * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, # <<<<<<<<<<<<<<
9111 : * self.dtype_is_object)
9112 : * except TypeError:
9113 : */
9114 0 : __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 438, __pyx_L4_error)
9115 0 : __Pyx_GOTREF(__pyx_t_8);
9116 0 : __Pyx_INCREF(__pyx_v_obj);
9117 0 : __Pyx_GIVEREF(__pyx_v_obj);
9118 0 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_obj)) __PYX_ERR(1, 438, __pyx_L4_error);
9119 0 : __Pyx_GIVEREF(__pyx_t_6);
9120 0 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_6)) __PYX_ERR(1, 438, __pyx_L4_error);
9121 0 : __Pyx_GIVEREF(__pyx_t_7);
9122 0 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_7)) __PYX_ERR(1, 438, __pyx_L4_error);
9123 0 : __pyx_t_6 = 0;
9124 0 : __pyx_t_7 = 0;
9125 0 : __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 438, __pyx_L4_error)
9126 0 : __Pyx_GOTREF(__pyx_t_7);
9127 0 : __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9128 0 : __Pyx_DECREF_SET(__pyx_v_obj, __pyx_t_7);
9129 0 : __pyx_t_7 = 0;
9130 :
9131 : /* "View.MemoryView":437
9132 : * cdef is_slice(self, obj):
9133 : * if not isinstance(obj, memoryview):
9134 : * try: # <<<<<<<<<<<<<<
9135 : * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
9136 : * self.dtype_is_object)
9137 : */
9138 : }
9139 0 : __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
9140 0 : __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
9141 0 : __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
9142 0 : goto __pyx_L9_try_end;
9143 0 : __pyx_L4_error:;
9144 0 : __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
9145 0 : __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
9146 0 : __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
9147 :
9148 : /* "View.MemoryView":440
9149 : * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
9150 : * self.dtype_is_object)
9151 : * except TypeError: # <<<<<<<<<<<<<<
9152 : * return None
9153 : *
9154 : */
9155 0 : __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
9156 0 : if (__pyx_t_9) {
9157 0 : __Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
9158 0 : if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_6) < 0) __PYX_ERR(1, 440, __pyx_L6_except_error)
9159 0 : __Pyx_XGOTREF(__pyx_t_7);
9160 0 : __Pyx_XGOTREF(__pyx_t_8);
9161 0 : __Pyx_XGOTREF(__pyx_t_6);
9162 :
9163 : /* "View.MemoryView":441
9164 : * self.dtype_is_object)
9165 : * except TypeError:
9166 : * return None # <<<<<<<<<<<<<<
9167 : *
9168 : * return obj
9169 : */
9170 0 : __Pyx_XDECREF(__pyx_r);
9171 0 : __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9172 0 : __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9173 0 : __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9174 0 : __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9175 0 : goto __pyx_L7_except_return;
9176 : }
9177 0 : goto __pyx_L6_except_error;
9178 :
9179 : /* "View.MemoryView":437
9180 : * cdef is_slice(self, obj):
9181 : * if not isinstance(obj, memoryview):
9182 : * try: # <<<<<<<<<<<<<<
9183 : * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
9184 : * self.dtype_is_object)
9185 : */
9186 0 : __pyx_L6_except_error:;
9187 0 : __Pyx_XGIVEREF(__pyx_t_3);
9188 0 : __Pyx_XGIVEREF(__pyx_t_4);
9189 0 : __Pyx_XGIVEREF(__pyx_t_5);
9190 0 : __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
9191 0 : goto __pyx_L1_error;
9192 0 : __pyx_L7_except_return:;
9193 0 : __Pyx_XGIVEREF(__pyx_t_3);
9194 0 : __Pyx_XGIVEREF(__pyx_t_4);
9195 0 : __Pyx_XGIVEREF(__pyx_t_5);
9196 0 : __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
9197 0 : goto __pyx_L0;
9198 0 : __pyx_L9_try_end:;
9199 : }
9200 :
9201 : /* "View.MemoryView":436
9202 : *
9203 : * cdef is_slice(self, obj):
9204 : * if not isinstance(obj, memoryview): # <<<<<<<<<<<<<<
9205 : * try:
9206 : * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
9207 : */
9208 : }
9209 :
9210 : /* "View.MemoryView":443
9211 : * return None
9212 : *
9213 : * return obj # <<<<<<<<<<<<<<
9214 : *
9215 : * cdef setitem_slice_assignment(self, dst, src):
9216 : */
9217 0 : __Pyx_XDECREF(__pyx_r);
9218 0 : __Pyx_INCREF(__pyx_v_obj);
9219 0 : __pyx_r = __pyx_v_obj;
9220 0 : goto __pyx_L0;
9221 :
9222 : /* "View.MemoryView":435
9223 : * self.setitem_indexed(index, value)
9224 : *
9225 : * cdef is_slice(self, obj): # <<<<<<<<<<<<<<
9226 : * if not isinstance(obj, memoryview):
9227 : * try:
9228 : */
9229 :
9230 : /* function exit code */
9231 0 : __pyx_L1_error:;
9232 0 : __Pyx_XDECREF(__pyx_t_6);
9233 0 : __Pyx_XDECREF(__pyx_t_7);
9234 0 : __Pyx_XDECREF(__pyx_t_8);
9235 0 : __Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
9236 0 : __pyx_r = 0;
9237 0 : __pyx_L0:;
9238 0 : __Pyx_XDECREF(__pyx_v_obj);
9239 0 : __Pyx_XGIVEREF(__pyx_r);
9240 0 : __Pyx_RefNannyFinishContext();
9241 0 : return __pyx_r;
9242 : }
9243 :
9244 : /* "View.MemoryView":445
9245 : * return obj
9246 : *
9247 : * cdef setitem_slice_assignment(self, dst, src): # <<<<<<<<<<<<<<
9248 : * cdef __Pyx_memviewslice dst_slice
9249 : * cdef __Pyx_memviewslice src_slice
9250 : */
9251 :
9252 0 : static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src) {
9253 0 : __Pyx_memviewslice __pyx_v_dst_slice;
9254 0 : __Pyx_memviewslice __pyx_v_src_slice;
9255 0 : __Pyx_memviewslice __pyx_v_msrc;
9256 0 : __Pyx_memviewslice __pyx_v_mdst;
9257 0 : PyObject *__pyx_r = NULL;
9258 : __Pyx_RefNannyDeclarations
9259 0 : __Pyx_memviewslice *__pyx_t_1;
9260 0 : PyObject *__pyx_t_2 = NULL;
9261 0 : int __pyx_t_3;
9262 0 : int __pyx_t_4;
9263 0 : int __pyx_t_5;
9264 0 : int __pyx_lineno = 0;
9265 0 : const char *__pyx_filename = NULL;
9266 0 : int __pyx_clineno = 0;
9267 0 : __Pyx_RefNannySetupContext("setitem_slice_assignment", 1);
9268 :
9269 : /* "View.MemoryView":448
9270 : * cdef __Pyx_memviewslice dst_slice
9271 : * cdef __Pyx_memviewslice src_slice
9272 : * cdef __Pyx_memviewslice msrc = get_slice_from_memview(src, &src_slice)[0] # <<<<<<<<<<<<<<
9273 : * cdef __Pyx_memviewslice mdst = get_slice_from_memview(dst, &dst_slice)[0]
9274 : *
9275 : */
9276 0 : if (!(likely(((__pyx_v_src) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_src, __pyx_memoryview_type))))) __PYX_ERR(1, 448, __pyx_L1_error)
9277 0 : __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_src), (&__pyx_v_src_slice)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 448, __pyx_L1_error)
9278 0 : __pyx_v_msrc = (__pyx_t_1[0]);
9279 :
9280 : /* "View.MemoryView":449
9281 : * cdef __Pyx_memviewslice src_slice
9282 : * cdef __Pyx_memviewslice msrc = get_slice_from_memview(src, &src_slice)[0]
9283 : * cdef __Pyx_memviewslice mdst = get_slice_from_memview(dst, &dst_slice)[0] # <<<<<<<<<<<<<<
9284 : *
9285 : * memoryview_copy_contents(msrc, mdst, src.ndim, dst.ndim, self.dtype_is_object)
9286 : */
9287 0 : if (!(likely(((__pyx_v_dst) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dst, __pyx_memoryview_type))))) __PYX_ERR(1, 449, __pyx_L1_error)
9288 0 : __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_dst), (&__pyx_v_dst_slice)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 449, __pyx_L1_error)
9289 0 : __pyx_v_mdst = (__pyx_t_1[0]);
9290 :
9291 : /* "View.MemoryView":451
9292 : * cdef __Pyx_memviewslice mdst = get_slice_from_memview(dst, &dst_slice)[0]
9293 : *
9294 : * memoryview_copy_contents(msrc, mdst, src.ndim, dst.ndim, self.dtype_is_object) # <<<<<<<<<<<<<<
9295 : *
9296 : * cdef setitem_slice_assign_scalar(self, memoryview dst, value):
9297 : */
9298 0 : __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_src, __pyx_n_s_ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 451, __pyx_L1_error)
9299 0 : __Pyx_GOTREF(__pyx_t_2);
9300 0 : __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 451, __pyx_L1_error)
9301 0 : __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9302 0 : __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dst, __pyx_n_s_ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 451, __pyx_L1_error)
9303 0 : __Pyx_GOTREF(__pyx_t_2);
9304 0 : __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 451, __pyx_L1_error)
9305 0 : __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9306 0 : __pyx_t_5 = __pyx_memoryview_copy_contents(__pyx_v_msrc, __pyx_v_mdst, __pyx_t_3, __pyx_t_4, __pyx_v_self->dtype_is_object); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 451, __pyx_L1_error)
9307 :
9308 : /* "View.MemoryView":445
9309 : * return obj
9310 : *
9311 : * cdef setitem_slice_assignment(self, dst, src): # <<<<<<<<<<<<<<
9312 : * cdef __Pyx_memviewslice dst_slice
9313 : * cdef __Pyx_memviewslice src_slice
9314 : */
9315 :
9316 : /* function exit code */
9317 0 : __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9318 0 : goto __pyx_L0;
9319 0 : __pyx_L1_error:;
9320 0 : __Pyx_XDECREF(__pyx_t_2);
9321 0 : __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assignment", __pyx_clineno, __pyx_lineno, __pyx_filename);
9322 0 : __pyx_r = 0;
9323 0 : __pyx_L0:;
9324 0 : __Pyx_XGIVEREF(__pyx_r);
9325 0 : __Pyx_RefNannyFinishContext();
9326 0 : return __pyx_r;
9327 : }
9328 :
9329 : /* "View.MemoryView":453
9330 : * memoryview_copy_contents(msrc, mdst, src.ndim, dst.ndim, self.dtype_is_object)
9331 : *
9332 : * cdef setitem_slice_assign_scalar(self, memoryview dst, value): # <<<<<<<<<<<<<<
9333 : * cdef int array[128]
9334 : * cdef void *tmp = NULL
9335 : */
9336 :
9337 0 : static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value) {
9338 0 : int __pyx_v_array[0x80];
9339 0 : void *__pyx_v_tmp;
9340 0 : void *__pyx_v_item;
9341 0 : __Pyx_memviewslice *__pyx_v_dst_slice;
9342 0 : __Pyx_memviewslice __pyx_v_tmp_slice;
9343 0 : PyObject *__pyx_r = NULL;
9344 : __Pyx_RefNannyDeclarations
9345 0 : __Pyx_memviewslice *__pyx_t_1;
9346 0 : int __pyx_t_2;
9347 0 : PyObject *__pyx_t_3 = NULL;
9348 0 : int __pyx_t_4;
9349 0 : int __pyx_t_5;
9350 0 : char const *__pyx_t_6;
9351 0 : PyObject *__pyx_t_7 = NULL;
9352 0 : PyObject *__pyx_t_8 = NULL;
9353 0 : PyObject *__pyx_t_9 = NULL;
9354 0 : PyObject *__pyx_t_10 = NULL;
9355 0 : PyObject *__pyx_t_11 = NULL;
9356 0 : PyObject *__pyx_t_12 = NULL;
9357 0 : int __pyx_lineno = 0;
9358 0 : const char *__pyx_filename = NULL;
9359 0 : int __pyx_clineno = 0;
9360 0 : __Pyx_RefNannySetupContext("setitem_slice_assign_scalar", 1);
9361 :
9362 : /* "View.MemoryView":455
9363 : * cdef setitem_slice_assign_scalar(self, memoryview dst, value):
9364 : * cdef int array[128]
9365 : * cdef void *tmp = NULL # <<<<<<<<<<<<<<
9366 : * cdef void *item
9367 : *
9368 : */
9369 0 : __pyx_v_tmp = NULL;
9370 :
9371 : /* "View.MemoryView":460
9372 : * cdef __Pyx_memviewslice *dst_slice
9373 : * cdef __Pyx_memviewslice tmp_slice
9374 : * dst_slice = get_slice_from_memview(dst, &tmp_slice) # <<<<<<<<<<<<<<
9375 : *
9376 : * if <size_t>self.view.itemsize > sizeof(array):
9377 : */
9378 0 : __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_dst, (&__pyx_v_tmp_slice)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 460, __pyx_L1_error)
9379 0 : __pyx_v_dst_slice = __pyx_t_1;
9380 :
9381 : /* "View.MemoryView":462
9382 : * dst_slice = get_slice_from_memview(dst, &tmp_slice)
9383 : *
9384 : * if <size_t>self.view.itemsize > sizeof(array): # <<<<<<<<<<<<<<
9385 : * tmp = PyMem_Malloc(self.view.itemsize)
9386 : * if tmp == NULL:
9387 : */
9388 0 : __pyx_t_2 = (((size_t)__pyx_v_self->view.itemsize) > (sizeof(__pyx_v_array)));
9389 0 : if (__pyx_t_2) {
9390 :
9391 : /* "View.MemoryView":463
9392 : *
9393 : * if <size_t>self.view.itemsize > sizeof(array):
9394 : * tmp = PyMem_Malloc(self.view.itemsize) # <<<<<<<<<<<<<<
9395 : * if tmp == NULL:
9396 : * raise MemoryError
9397 : */
9398 0 : __pyx_v_tmp = PyMem_Malloc(__pyx_v_self->view.itemsize);
9399 :
9400 : /* "View.MemoryView":464
9401 : * if <size_t>self.view.itemsize > sizeof(array):
9402 : * tmp = PyMem_Malloc(self.view.itemsize)
9403 : * if tmp == NULL: # <<<<<<<<<<<<<<
9404 : * raise MemoryError
9405 : * item = tmp
9406 : */
9407 0 : __pyx_t_2 = (__pyx_v_tmp == NULL);
9408 0 : if (unlikely(__pyx_t_2)) {
9409 :
9410 : /* "View.MemoryView":465
9411 : * tmp = PyMem_Malloc(self.view.itemsize)
9412 : * if tmp == NULL:
9413 : * raise MemoryError # <<<<<<<<<<<<<<
9414 : * item = tmp
9415 : * else:
9416 : */
9417 0 : PyErr_NoMemory(); __PYX_ERR(1, 465, __pyx_L1_error)
9418 :
9419 : /* "View.MemoryView":464
9420 : * if <size_t>self.view.itemsize > sizeof(array):
9421 : * tmp = PyMem_Malloc(self.view.itemsize)
9422 : * if tmp == NULL: # <<<<<<<<<<<<<<
9423 : * raise MemoryError
9424 : * item = tmp
9425 : */
9426 : }
9427 :
9428 : /* "View.MemoryView":466
9429 : * if tmp == NULL:
9430 : * raise MemoryError
9431 : * item = tmp # <<<<<<<<<<<<<<
9432 : * else:
9433 : * item = <void *> array
9434 : */
9435 0 : __pyx_v_item = __pyx_v_tmp;
9436 :
9437 : /* "View.MemoryView":462
9438 : * dst_slice = get_slice_from_memview(dst, &tmp_slice)
9439 : *
9440 : * if <size_t>self.view.itemsize > sizeof(array): # <<<<<<<<<<<<<<
9441 : * tmp = PyMem_Malloc(self.view.itemsize)
9442 : * if tmp == NULL:
9443 : */
9444 0 : goto __pyx_L3;
9445 : }
9446 :
9447 : /* "View.MemoryView":468
9448 : * item = tmp
9449 : * else:
9450 : * item = <void *> array # <<<<<<<<<<<<<<
9451 : *
9452 : * try:
9453 : */
9454 : /*else*/ {
9455 : __pyx_v_item = ((void *)__pyx_v_array);
9456 : }
9457 0 : __pyx_L3:;
9458 :
9459 : /* "View.MemoryView":470
9460 : * item = <void *> array
9461 : *
9462 : * try: # <<<<<<<<<<<<<<
9463 : * if self.dtype_is_object:
9464 : * (<PyObject **> item)[0] = <PyObject *> value
9465 : */
9466 : /*try:*/ {
9467 :
9468 : /* "View.MemoryView":471
9469 : *
9470 : * try:
9471 : * if self.dtype_is_object: # <<<<<<<<<<<<<<
9472 : * (<PyObject **> item)[0] = <PyObject *> value
9473 : * else:
9474 : */
9475 0 : if (__pyx_v_self->dtype_is_object) {
9476 :
9477 : /* "View.MemoryView":472
9478 : * try:
9479 : * if self.dtype_is_object:
9480 : * (<PyObject **> item)[0] = <PyObject *> value # <<<<<<<<<<<<<<
9481 : * else:
9482 : * self.assign_item_from_object(<char *> item, value)
9483 : */
9484 0 : (((PyObject **)__pyx_v_item)[0]) = ((PyObject *)__pyx_v_value);
9485 :
9486 : /* "View.MemoryView":471
9487 : *
9488 : * try:
9489 : * if self.dtype_is_object: # <<<<<<<<<<<<<<
9490 : * (<PyObject **> item)[0] = <PyObject *> value
9491 : * else:
9492 : */
9493 0 : goto __pyx_L8;
9494 : }
9495 :
9496 : /* "View.MemoryView":474
9497 : * (<PyObject **> item)[0] = <PyObject *> value
9498 : * else:
9499 : * self.assign_item_from_object(<char *> item, value) # <<<<<<<<<<<<<<
9500 : *
9501 : *
9502 : */
9503 : /*else*/ {
9504 0 : __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, ((char *)__pyx_v_item), __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 474, __pyx_L6_error)
9505 0 : __Pyx_GOTREF(__pyx_t_3);
9506 0 : __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9507 : }
9508 0 : __pyx_L8:;
9509 :
9510 : /* "View.MemoryView":478
9511 : *
9512 : *
9513 : * if self.view.suboffsets != NULL: # <<<<<<<<<<<<<<
9514 : * assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
9515 : * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
9516 : */
9517 0 : __pyx_t_2 = (__pyx_v_self->view.suboffsets != NULL);
9518 0 : if (__pyx_t_2) {
9519 :
9520 : /* "View.MemoryView":479
9521 : *
9522 : * if self.view.suboffsets != NULL:
9523 : * assert_direct_dimensions(self.view.suboffsets, self.view.ndim) # <<<<<<<<<<<<<<
9524 : * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
9525 : * item, self.dtype_is_object)
9526 : */
9527 0 : __pyx_t_4 = assert_direct_dimensions(__pyx_v_self->view.suboffsets, __pyx_v_self->view.ndim); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 479, __pyx_L6_error)
9528 :
9529 : /* "View.MemoryView":478
9530 : *
9531 : *
9532 : * if self.view.suboffsets != NULL: # <<<<<<<<<<<<<<
9533 : * assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
9534 : * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
9535 : */
9536 : }
9537 :
9538 : /* "View.MemoryView":480
9539 : * if self.view.suboffsets != NULL:
9540 : * assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
9541 : * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize, # <<<<<<<<<<<<<<
9542 : * item, self.dtype_is_object)
9543 : * finally:
9544 : */
9545 0 : __pyx_memoryview_slice_assign_scalar(__pyx_v_dst_slice, __pyx_v_dst->view.ndim, __pyx_v_self->view.itemsize, __pyx_v_item, __pyx_v_self->dtype_is_object);
9546 : }
9547 :
9548 : /* "View.MemoryView":483
9549 : * item, self.dtype_is_object)
9550 : * finally:
9551 : * PyMem_Free(tmp) # <<<<<<<<<<<<<<
9552 : *
9553 : * cdef setitem_indexed(self, index, value):
9554 : */
9555 : /*finally:*/ {
9556 : /*normal exit:*/{
9557 0 : PyMem_Free(__pyx_v_tmp);
9558 0 : goto __pyx_L7;
9559 : }
9560 0 : __pyx_L6_error:;
9561 : /*exception exit:*/{
9562 0 : __Pyx_PyThreadState_declare
9563 0 : __Pyx_PyThreadState_assign
9564 0 : __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;
9565 0 : __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
9566 0 : if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
9567 0 : if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9) < 0)) __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
9568 0 : __Pyx_XGOTREF(__pyx_t_7);
9569 0 : __Pyx_XGOTREF(__pyx_t_8);
9570 0 : __Pyx_XGOTREF(__pyx_t_9);
9571 0 : __Pyx_XGOTREF(__pyx_t_10);
9572 0 : __Pyx_XGOTREF(__pyx_t_11);
9573 0 : __Pyx_XGOTREF(__pyx_t_12);
9574 0 : __pyx_t_4 = __pyx_lineno; __pyx_t_5 = __pyx_clineno; __pyx_t_6 = __pyx_filename;
9575 : {
9576 0 : PyMem_Free(__pyx_v_tmp);
9577 : }
9578 0 : if (PY_MAJOR_VERSION >= 3) {
9579 0 : __Pyx_XGIVEREF(__pyx_t_10);
9580 0 : __Pyx_XGIVEREF(__pyx_t_11);
9581 0 : __Pyx_XGIVEREF(__pyx_t_12);
9582 0 : __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
9583 : }
9584 0 : __Pyx_XGIVEREF(__pyx_t_7);
9585 0 : __Pyx_XGIVEREF(__pyx_t_8);
9586 0 : __Pyx_XGIVEREF(__pyx_t_9);
9587 0 : __Pyx_ErrRestore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
9588 0 : __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;
9589 0 : __pyx_lineno = __pyx_t_4; __pyx_clineno = __pyx_t_5; __pyx_filename = __pyx_t_6;
9590 0 : goto __pyx_L1_error;
9591 : }
9592 0 : __pyx_L7:;
9593 : }
9594 :
9595 : /* "View.MemoryView":453
9596 : * memoryview_copy_contents(msrc, mdst, src.ndim, dst.ndim, self.dtype_is_object)
9597 : *
9598 : * cdef setitem_slice_assign_scalar(self, memoryview dst, value): # <<<<<<<<<<<<<<
9599 : * cdef int array[128]
9600 : * cdef void *tmp = NULL
9601 : */
9602 :
9603 : /* function exit code */
9604 0 : __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9605 0 : goto __pyx_L0;
9606 0 : __pyx_L1_error:;
9607 0 : __Pyx_XDECREF(__pyx_t_3);
9608 0 : __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assign_scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
9609 0 : __pyx_r = 0;
9610 0 : __pyx_L0:;
9611 0 : __Pyx_XGIVEREF(__pyx_r);
9612 0 : __Pyx_RefNannyFinishContext();
9613 0 : return __pyx_r;
9614 : }
9615 :
9616 : /* "View.MemoryView":485
9617 : * PyMem_Free(tmp)
9618 : *
9619 : * cdef setitem_indexed(self, index, value): # <<<<<<<<<<<<<<
9620 : * cdef char *itemp = self.get_item_pointer(index)
9621 : * self.assign_item_from_object(itemp, value)
9622 : */
9623 :
9624 0 : static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
9625 0 : char *__pyx_v_itemp;
9626 0 : PyObject *__pyx_r = NULL;
9627 : __Pyx_RefNannyDeclarations
9628 0 : char *__pyx_t_1;
9629 0 : PyObject *__pyx_t_2 = NULL;
9630 0 : int __pyx_lineno = 0;
9631 0 : const char *__pyx_filename = NULL;
9632 0 : int __pyx_clineno = 0;
9633 0 : __Pyx_RefNannySetupContext("setitem_indexed", 1);
9634 :
9635 : /* "View.MemoryView":486
9636 : *
9637 : * cdef setitem_indexed(self, index, value):
9638 : * cdef char *itemp = self.get_item_pointer(index) # <<<<<<<<<<<<<<
9639 : * self.assign_item_from_object(itemp, value)
9640 : *
9641 : */
9642 0 : __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_index); if (unlikely(__pyx_t_1 == ((char *)NULL))) __PYX_ERR(1, 486, __pyx_L1_error)
9643 0 : __pyx_v_itemp = __pyx_t_1;
9644 :
9645 : /* "View.MemoryView":487
9646 : * cdef setitem_indexed(self, index, value):
9647 : * cdef char *itemp = self.get_item_pointer(index)
9648 : * self.assign_item_from_object(itemp, value) # <<<<<<<<<<<<<<
9649 : *
9650 : * cdef convert_item_to_object(self, char *itemp):
9651 : */
9652 0 : __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 487, __pyx_L1_error)
9653 0 : __Pyx_GOTREF(__pyx_t_2);
9654 0 : __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9655 :
9656 : /* "View.MemoryView":485
9657 : * PyMem_Free(tmp)
9658 : *
9659 : * cdef setitem_indexed(self, index, value): # <<<<<<<<<<<<<<
9660 : * cdef char *itemp = self.get_item_pointer(index)
9661 : * self.assign_item_from_object(itemp, value)
9662 : */
9663 :
9664 : /* function exit code */
9665 0 : __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9666 0 : goto __pyx_L0;
9667 0 : __pyx_L1_error:;
9668 0 : __Pyx_XDECREF(__pyx_t_2);
9669 0 : __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_indexed", __pyx_clineno, __pyx_lineno, __pyx_filename);
9670 0 : __pyx_r = 0;
9671 0 : __pyx_L0:;
9672 0 : __Pyx_XGIVEREF(__pyx_r);
9673 0 : __Pyx_RefNannyFinishContext();
9674 0 : return __pyx_r;
9675 : }
9676 :
9677 : /* "View.MemoryView":489
9678 : * self.assign_item_from_object(itemp, value)
9679 : *
9680 : * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<<
9681 : * """Only used if instantiated manually by the user, or if Cython doesn't
9682 : * know how to convert the type"""
9683 : */
9684 :
9685 0 : static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp) {
9686 0 : PyObject *__pyx_v_struct = NULL;
9687 0 : PyObject *__pyx_v_bytesitem = 0;
9688 0 : PyObject *__pyx_v_result = NULL;
9689 0 : PyObject *__pyx_r = NULL;
9690 : __Pyx_RefNannyDeclarations
9691 0 : PyObject *__pyx_t_1 = NULL;
9692 0 : PyObject *__pyx_t_2 = NULL;
9693 0 : PyObject *__pyx_t_3 = NULL;
9694 0 : PyObject *__pyx_t_4 = NULL;
9695 0 : PyObject *__pyx_t_5 = NULL;
9696 0 : PyObject *__pyx_t_6 = NULL;
9697 0 : PyObject *__pyx_t_7 = NULL;
9698 0 : unsigned int __pyx_t_8;
9699 0 : Py_ssize_t __pyx_t_9;
9700 0 : int __pyx_t_10;
9701 0 : int __pyx_t_11;
9702 0 : int __pyx_lineno = 0;
9703 0 : const char *__pyx_filename = NULL;
9704 0 : int __pyx_clineno = 0;
9705 0 : __Pyx_RefNannySetupContext("convert_item_to_object", 1);
9706 :
9707 : /* "View.MemoryView":492
9708 : * """Only used if instantiated manually by the user, or if Cython doesn't
9709 : * know how to convert the type"""
9710 : * import struct # <<<<<<<<<<<<<<
9711 : * cdef bytes bytesitem
9712 : *
9713 : */
9714 0 : __pyx_t_1 = __Pyx_ImportDottedModule(__pyx_n_s_struct, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 492, __pyx_L1_error)
9715 0 : __Pyx_GOTREF(__pyx_t_1);
9716 0 : __pyx_v_struct = __pyx_t_1;
9717 0 : __pyx_t_1 = 0;
9718 :
9719 : /* "View.MemoryView":495
9720 : * cdef bytes bytesitem
9721 : *
9722 : * bytesitem = itemp[:self.view.itemsize] # <<<<<<<<<<<<<<
9723 : * try:
9724 : * result = struct.unpack(self.view.format, bytesitem)
9725 : */
9726 0 : __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_itemp + 0, __pyx_v_self->view.itemsize - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 495, __pyx_L1_error)
9727 0 : __Pyx_GOTREF(__pyx_t_1);
9728 0 : __pyx_v_bytesitem = ((PyObject*)__pyx_t_1);
9729 0 : __pyx_t_1 = 0;
9730 :
9731 : /* "View.MemoryView":496
9732 : *
9733 : * bytesitem = itemp[:self.view.itemsize]
9734 : * try: # <<<<<<<<<<<<<<
9735 : * result = struct.unpack(self.view.format, bytesitem)
9736 : * except struct.error:
9737 : */
9738 : {
9739 0 : __Pyx_PyThreadState_declare
9740 0 : __Pyx_PyThreadState_assign
9741 0 : __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
9742 0 : __Pyx_XGOTREF(__pyx_t_2);
9743 0 : __Pyx_XGOTREF(__pyx_t_3);
9744 0 : __Pyx_XGOTREF(__pyx_t_4);
9745 : /*try:*/ {
9746 :
9747 : /* "View.MemoryView":497
9748 : * bytesitem = itemp[:self.view.itemsize]
9749 : * try:
9750 : * result = struct.unpack(self.view.format, bytesitem) # <<<<<<<<<<<<<<
9751 : * except struct.error:
9752 : * raise ValueError, "Unable to convert item to object"
9753 : */
9754 0 : __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_unpack); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 497, __pyx_L3_error)
9755 0 : __Pyx_GOTREF(__pyx_t_5);
9756 0 : __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 497, __pyx_L3_error)
9757 0 : __Pyx_GOTREF(__pyx_t_6);
9758 0 : __pyx_t_7 = NULL;
9759 0 : __pyx_t_8 = 0;
9760 : #if CYTHON_UNPACK_METHODS
9761 0 : if (likely(PyMethod_Check(__pyx_t_5))) {
9762 0 : __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
9763 0 : if (likely(__pyx_t_7)) {
9764 0 : PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
9765 0 : __Pyx_INCREF(__pyx_t_7);
9766 0 : __Pyx_INCREF(function);
9767 0 : __Pyx_DECREF_SET(__pyx_t_5, function);
9768 : __pyx_t_8 = 1;
9769 : }
9770 : }
9771 : #endif
9772 : {
9773 0 : PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_bytesitem};
9774 0 : __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_8, 2+__pyx_t_8);
9775 0 : __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
9776 0 : __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9777 0 : if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 497, __pyx_L3_error)
9778 0 : __Pyx_GOTREF(__pyx_t_1);
9779 0 : __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
9780 : }
9781 0 : __pyx_v_result = __pyx_t_1;
9782 0 : __pyx_t_1 = 0;
9783 :
9784 : /* "View.MemoryView":496
9785 : *
9786 : * bytesitem = itemp[:self.view.itemsize]
9787 : * try: # <<<<<<<<<<<<<<
9788 : * result = struct.unpack(self.view.format, bytesitem)
9789 : * except struct.error:
9790 : */
9791 : }
9792 :
9793 : /* "View.MemoryView":501
9794 : * raise ValueError, "Unable to convert item to object"
9795 : * else:
9796 : * if len(self.view.format) == 1: # <<<<<<<<<<<<<<
9797 : * return result[0]
9798 : * return result
9799 : */
9800 : /*else:*/ {
9801 0 : __pyx_t_9 = __Pyx_ssize_strlen(__pyx_v_self->view.format); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(1, 501, __pyx_L5_except_error)
9802 0 : __pyx_t_10 = (__pyx_t_9 == 1);
9803 0 : if (__pyx_t_10) {
9804 :
9805 : /* "View.MemoryView":502
9806 : * else:
9807 : * if len(self.view.format) == 1:
9808 : * return result[0] # <<<<<<<<<<<<<<
9809 : * return result
9810 : *
9811 : */
9812 0 : __Pyx_XDECREF(__pyx_r);
9813 0 : __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_result, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 502, __pyx_L5_except_error)
9814 0 : __Pyx_GOTREF(__pyx_t_1);
9815 0 : __pyx_r = __pyx_t_1;
9816 0 : __pyx_t_1 = 0;
9817 0 : goto __pyx_L6_except_return;
9818 :
9819 : /* "View.MemoryView":501
9820 : * raise ValueError, "Unable to convert item to object"
9821 : * else:
9822 : * if len(self.view.format) == 1: # <<<<<<<<<<<<<<
9823 : * return result[0]
9824 : * return result
9825 : */
9826 : }
9827 :
9828 : /* "View.MemoryView":503
9829 : * if len(self.view.format) == 1:
9830 : * return result[0]
9831 : * return result # <<<<<<<<<<<<<<
9832 : *
9833 : * cdef assign_item_from_object(self, char *itemp, object value):
9834 : */
9835 0 : __Pyx_XDECREF(__pyx_r);
9836 0 : __Pyx_INCREF(__pyx_v_result);
9837 0 : __pyx_r = __pyx_v_result;
9838 0 : goto __pyx_L6_except_return;
9839 : }
9840 0 : __pyx_L3_error:;
9841 0 : __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
9842 0 : __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
9843 0 : __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
9844 0 : __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
9845 :
9846 : /* "View.MemoryView":498
9847 : * try:
9848 : * result = struct.unpack(self.view.format, bytesitem)
9849 : * except struct.error: # <<<<<<<<<<<<<<
9850 : * raise ValueError, "Unable to convert item to object"
9851 : * else:
9852 : */
9853 0 : __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_5, &__pyx_t_6);
9854 0 : __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 498, __pyx_L5_except_error)
9855 0 : __Pyx_GOTREF(__pyx_t_7);
9856 0 : __pyx_t_11 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_7);
9857 0 : __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9858 0 : __Pyx_ErrRestore(__pyx_t_1, __pyx_t_5, __pyx_t_6);
9859 0 : __pyx_t_1 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0;
9860 0 : if (__pyx_t_11) {
9861 0 : __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
9862 0 : if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_1) < 0) __PYX_ERR(1, 498, __pyx_L5_except_error)
9863 0 : __Pyx_XGOTREF(__pyx_t_6);
9864 0 : __Pyx_XGOTREF(__pyx_t_5);
9865 0 : __Pyx_XGOTREF(__pyx_t_1);
9866 :
9867 : /* "View.MemoryView":499
9868 : * result = struct.unpack(self.view.format, bytesitem)
9869 : * except struct.error:
9870 : * raise ValueError, "Unable to convert item to object" # <<<<<<<<<<<<<<
9871 : * else:
9872 : * if len(self.view.format) == 1:
9873 : */
9874 0 : __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Unable_to_convert_item_to_object, 0, 0);
9875 0 : __PYX_ERR(1, 499, __pyx_L5_except_error)
9876 : }
9877 0 : goto __pyx_L5_except_error;
9878 :
9879 : /* "View.MemoryView":496
9880 : *
9881 : * bytesitem = itemp[:self.view.itemsize]
9882 : * try: # <<<<<<<<<<<<<<
9883 : * result = struct.unpack(self.view.format, bytesitem)
9884 : * except struct.error:
9885 : */
9886 0 : __pyx_L5_except_error:;
9887 0 : __Pyx_XGIVEREF(__pyx_t_2);
9888 0 : __Pyx_XGIVEREF(__pyx_t_3);
9889 0 : __Pyx_XGIVEREF(__pyx_t_4);
9890 0 : __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
9891 0 : goto __pyx_L1_error;
9892 0 : __pyx_L6_except_return:;
9893 0 : __Pyx_XGIVEREF(__pyx_t_2);
9894 0 : __Pyx_XGIVEREF(__pyx_t_3);
9895 0 : __Pyx_XGIVEREF(__pyx_t_4);
9896 0 : __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
9897 0 : goto __pyx_L0;
9898 : }
9899 :
9900 : /* "View.MemoryView":489
9901 : * self.assign_item_from_object(itemp, value)
9902 : *
9903 : * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<<
9904 : * """Only used if instantiated manually by the user, or if Cython doesn't
9905 : * know how to convert the type"""
9906 : */
9907 :
9908 : /* function exit code */
9909 0 : __pyx_L1_error:;
9910 0 : __Pyx_XDECREF(__pyx_t_1);
9911 0 : __Pyx_XDECREF(__pyx_t_5);
9912 0 : __Pyx_XDECREF(__pyx_t_6);
9913 0 : __Pyx_XDECREF(__pyx_t_7);
9914 0 : __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
9915 0 : __pyx_r = 0;
9916 0 : __pyx_L0:;
9917 0 : __Pyx_XDECREF(__pyx_v_struct);
9918 0 : __Pyx_XDECREF(__pyx_v_bytesitem);
9919 0 : __Pyx_XDECREF(__pyx_v_result);
9920 0 : __Pyx_XGIVEREF(__pyx_r);
9921 0 : __Pyx_RefNannyFinishContext();
9922 0 : return __pyx_r;
9923 : }
9924 :
9925 : /* "View.MemoryView":505
9926 : * return result
9927 : *
9928 : * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<<
9929 : * """Only used if instantiated manually by the user, or if Cython doesn't
9930 : * know how to convert the type"""
9931 : */
9932 :
9933 0 : static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) {
9934 0 : PyObject *__pyx_v_struct = NULL;
9935 0 : char __pyx_v_c;
9936 0 : PyObject *__pyx_v_bytesvalue = 0;
9937 0 : Py_ssize_t __pyx_v_i;
9938 0 : PyObject *__pyx_r = NULL;
9939 : __Pyx_RefNannyDeclarations
9940 0 : PyObject *__pyx_t_1 = NULL;
9941 0 : int __pyx_t_2;
9942 0 : PyObject *__pyx_t_3 = NULL;
9943 0 : PyObject *__pyx_t_4 = NULL;
9944 0 : PyObject *__pyx_t_5 = NULL;
9945 0 : unsigned int __pyx_t_6;
9946 0 : Py_ssize_t __pyx_t_7;
9947 0 : PyObject *__pyx_t_8 = NULL;
9948 0 : char *__pyx_t_9;
9949 0 : char *__pyx_t_10;
9950 0 : char *__pyx_t_11;
9951 0 : char *__pyx_t_12;
9952 0 : int __pyx_lineno = 0;
9953 0 : const char *__pyx_filename = NULL;
9954 0 : int __pyx_clineno = 0;
9955 0 : __Pyx_RefNannySetupContext("assign_item_from_object", 1);
9956 :
9957 : /* "View.MemoryView":508
9958 : * """Only used if instantiated manually by the user, or if Cython doesn't
9959 : * know how to convert the type"""
9960 : * import struct # <<<<<<<<<<<<<<
9961 : * cdef char c
9962 : * cdef bytes bytesvalue
9963 : */
9964 0 : __pyx_t_1 = __Pyx_ImportDottedModule(__pyx_n_s_struct, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 508, __pyx_L1_error)
9965 0 : __Pyx_GOTREF(__pyx_t_1);
9966 0 : __pyx_v_struct = __pyx_t_1;
9967 0 : __pyx_t_1 = 0;
9968 :
9969 : /* "View.MemoryView":513
9970 : * cdef Py_ssize_t i
9971 : *
9972 : * if isinstance(value, tuple): # <<<<<<<<<<<<<<
9973 : * bytesvalue = struct.pack(self.view.format, *value)
9974 : * else:
9975 : */
9976 0 : __pyx_t_2 = PyTuple_Check(__pyx_v_value);
9977 0 : if (__pyx_t_2) {
9978 :
9979 : /* "View.MemoryView":514
9980 : *
9981 : * if isinstance(value, tuple):
9982 : * bytesvalue = struct.pack(self.view.format, *value) # <<<<<<<<<<<<<<
9983 : * else:
9984 : * bytesvalue = struct.pack(self.view.format, value)
9985 : */
9986 0 : __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 514, __pyx_L1_error)
9987 0 : __Pyx_GOTREF(__pyx_t_1);
9988 0 : __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 514, __pyx_L1_error)
9989 0 : __Pyx_GOTREF(__pyx_t_3);
9990 0 : __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 514, __pyx_L1_error)
9991 0 : __Pyx_GOTREF(__pyx_t_4);
9992 0 : __Pyx_GIVEREF(__pyx_t_3);
9993 0 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(1, 514, __pyx_L1_error);
9994 0 : __pyx_t_3 = 0;
9995 0 : __pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 514, __pyx_L1_error)
9996 0 : __Pyx_GOTREF(__pyx_t_3);
9997 0 : __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 514, __pyx_L1_error)
9998 0 : __Pyx_GOTREF(__pyx_t_5);
9999 0 : __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
10000 0 : __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10001 0 : __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 514, __pyx_L1_error)
10002 0 : __Pyx_GOTREF(__pyx_t_3);
10003 0 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10004 0 : __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
10005 0 : if (!(likely(PyBytes_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_3))) __PYX_ERR(1, 514, __pyx_L1_error)
10006 0 : __pyx_v_bytesvalue = ((PyObject*)__pyx_t_3);
10007 0 : __pyx_t_3 = 0;
10008 :
10009 : /* "View.MemoryView":513
10010 : * cdef Py_ssize_t i
10011 : *
10012 : * if isinstance(value, tuple): # <<<<<<<<<<<<<<
10013 : * bytesvalue = struct.pack(self.view.format, *value)
10014 : * else:
10015 : */
10016 0 : goto __pyx_L3;
10017 : }
10018 :
10019 : /* "View.MemoryView":516
10020 : * bytesvalue = struct.pack(self.view.format, *value)
10021 : * else:
10022 : * bytesvalue = struct.pack(self.view.format, value) # <<<<<<<<<<<<<<
10023 : *
10024 : * for i, c in enumerate(bytesvalue):
10025 : */
10026 : /*else*/ {
10027 0 : __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 516, __pyx_L1_error)
10028 0 : __Pyx_GOTREF(__pyx_t_5);
10029 0 : __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 516, __pyx_L1_error)
10030 0 : __Pyx_GOTREF(__pyx_t_1);
10031 0 : __pyx_t_4 = NULL;
10032 0 : __pyx_t_6 = 0;
10033 : #if CYTHON_UNPACK_METHODS
10034 0 : if (likely(PyMethod_Check(__pyx_t_5))) {
10035 0 : __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
10036 0 : if (likely(__pyx_t_4)) {
10037 0 : PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
10038 0 : __Pyx_INCREF(__pyx_t_4);
10039 0 : __Pyx_INCREF(function);
10040 0 : __Pyx_DECREF_SET(__pyx_t_5, function);
10041 : __pyx_t_6 = 1;
10042 : }
10043 : }
10044 : #endif
10045 : {
10046 0 : PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_1, __pyx_v_value};
10047 0 : __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6);
10048 0 : __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
10049 0 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10050 0 : if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 516, __pyx_L1_error)
10051 0 : __Pyx_GOTREF(__pyx_t_3);
10052 0 : __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
10053 : }
10054 0 : if (!(likely(PyBytes_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_3))) __PYX_ERR(1, 516, __pyx_L1_error)
10055 : __pyx_v_bytesvalue = ((PyObject*)__pyx_t_3);
10056 : __pyx_t_3 = 0;
10057 : }
10058 0 : __pyx_L3:;
10059 :
10060 : /* "View.MemoryView":518
10061 : * bytesvalue = struct.pack(self.view.format, value)
10062 : *
10063 : * for i, c in enumerate(bytesvalue): # <<<<<<<<<<<<<<
10064 : * itemp[i] = c
10065 : *
10066 : */
10067 0 : __pyx_t_7 = 0;
10068 0 : if (unlikely(__pyx_v_bytesvalue == Py_None)) {
10069 0 : PyErr_SetString(PyExc_TypeError, "'NoneType' is not iterable");
10070 0 : __PYX_ERR(1, 518, __pyx_L1_error)
10071 : }
10072 0 : __Pyx_INCREF(__pyx_v_bytesvalue);
10073 0 : __pyx_t_8 = __pyx_v_bytesvalue;
10074 0 : __pyx_t_10 = PyBytes_AS_STRING(__pyx_t_8);
10075 0 : __pyx_t_11 = (__pyx_t_10 + PyBytes_GET_SIZE(__pyx_t_8));
10076 0 : for (__pyx_t_12 = __pyx_t_10; __pyx_t_12 < __pyx_t_11; __pyx_t_12++) {
10077 0 : __pyx_t_9 = __pyx_t_12;
10078 0 : __pyx_v_c = (__pyx_t_9[0]);
10079 :
10080 : /* "View.MemoryView":519
10081 : *
10082 : * for i, c in enumerate(bytesvalue):
10083 : * itemp[i] = c # <<<<<<<<<<<<<<
10084 : *
10085 : * @cname('getbuffer')
10086 : */
10087 0 : __pyx_v_i = __pyx_t_7;
10088 :
10089 : /* "View.MemoryView":518
10090 : * bytesvalue = struct.pack(self.view.format, value)
10091 : *
10092 : * for i, c in enumerate(bytesvalue): # <<<<<<<<<<<<<<
10093 : * itemp[i] = c
10094 : *
10095 : */
10096 0 : __pyx_t_7 = (__pyx_t_7 + 1);
10097 :
10098 : /* "View.MemoryView":519
10099 : *
10100 : * for i, c in enumerate(bytesvalue):
10101 : * itemp[i] = c # <<<<<<<<<<<<<<
10102 : *
10103 : * @cname('getbuffer')
10104 : */
10105 0 : (__pyx_v_itemp[__pyx_v_i]) = __pyx_v_c;
10106 : }
10107 0 : __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
10108 :
10109 : /* "View.MemoryView":505
10110 : * return result
10111 : *
10112 : * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<<
10113 : * """Only used if instantiated manually by the user, or if Cython doesn't
10114 : * know how to convert the type"""
10115 : */
10116 :
10117 : /* function exit code */
10118 0 : __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10119 0 : goto __pyx_L0;
10120 0 : __pyx_L1_error:;
10121 0 : __Pyx_XDECREF(__pyx_t_1);
10122 0 : __Pyx_XDECREF(__pyx_t_3);
10123 0 : __Pyx_XDECREF(__pyx_t_4);
10124 0 : __Pyx_XDECREF(__pyx_t_5);
10125 0 : __Pyx_XDECREF(__pyx_t_8);
10126 0 : __Pyx_AddTraceback("View.MemoryView.memoryview.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
10127 0 : __pyx_r = 0;
10128 0 : __pyx_L0:;
10129 0 : __Pyx_XDECREF(__pyx_v_struct);
10130 0 : __Pyx_XDECREF(__pyx_v_bytesvalue);
10131 0 : __Pyx_XGIVEREF(__pyx_r);
10132 0 : __Pyx_RefNannyFinishContext();
10133 0 : return __pyx_r;
10134 : }
10135 :
10136 : /* "View.MemoryView":521
10137 : * itemp[i] = c
10138 : *
10139 : * @cname('getbuffer') # <<<<<<<<<<<<<<
10140 : * def __getbuffer__(self, Py_buffer *info, int flags):
10141 : * if flags & PyBUF_WRITABLE and self.view.readonly:
10142 : */
10143 :
10144 : /* Python wrapper */
10145 : CYTHON_UNUSED static int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
10146 0 : CYTHON_UNUSED static int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
10147 0 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
10148 0 : int __pyx_r;
10149 : __Pyx_RefNannyDeclarations
10150 0 : __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
10151 0 : __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
10152 0 : __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));
10153 :
10154 : /* function exit code */
10155 0 : __Pyx_RefNannyFinishContext();
10156 0 : return __pyx_r;
10157 : }
10158 :
10159 0 : static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
10160 0 : int __pyx_r;
10161 : __Pyx_RefNannyDeclarations
10162 0 : int __pyx_t_1;
10163 0 : int __pyx_t_2;
10164 0 : Py_ssize_t *__pyx_t_3;
10165 0 : char *__pyx_t_4;
10166 0 : void *__pyx_t_5;
10167 0 : int __pyx_t_6;
10168 0 : Py_ssize_t __pyx_t_7;
10169 0 : int __pyx_lineno = 0;
10170 0 : const char *__pyx_filename = NULL;
10171 0 : int __pyx_clineno = 0;
10172 0 : if (unlikely(__pyx_v_info == NULL)) {
10173 0 : PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
10174 0 : return -1;
10175 : }
10176 0 : __Pyx_RefNannySetupContext("__getbuffer__", 0);
10177 0 : __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
10178 0 : __Pyx_GIVEREF(__pyx_v_info->obj);
10179 :
10180 : /* "View.MemoryView":523
10181 : * @cname('getbuffer')
10182 : * def __getbuffer__(self, Py_buffer *info, int flags):
10183 : * if flags & PyBUF_WRITABLE and self.view.readonly: # <<<<<<<<<<<<<<
10184 : * raise ValueError, "Cannot create writable memory view from read-only memoryview"
10185 : *
10186 : */
10187 0 : __pyx_t_2 = ((__pyx_v_flags & PyBUF_WRITABLE) != 0);
10188 0 : if (__pyx_t_2) {
10189 0 : } else {
10190 0 : __pyx_t_1 = __pyx_t_2;
10191 0 : goto __pyx_L4_bool_binop_done;
10192 : }
10193 0 : __pyx_t_1 = __pyx_v_self->view.readonly;
10194 0 : __pyx_L4_bool_binop_done:;
10195 0 : if (unlikely(__pyx_t_1)) {
10196 :
10197 : /* "View.MemoryView":524
10198 : * def __getbuffer__(self, Py_buffer *info, int flags):
10199 : * if flags & PyBUF_WRITABLE and self.view.readonly:
10200 : * raise ValueError, "Cannot create writable memory view from read-only memoryview" # <<<<<<<<<<<<<<
10201 : *
10202 : * if flags & PyBUF_ND:
10203 : */
10204 0 : __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Cannot_create_writable_memory_vi, 0, 0);
10205 0 : __PYX_ERR(1, 524, __pyx_L1_error)
10206 :
10207 : /* "View.MemoryView":523
10208 : * @cname('getbuffer')
10209 : * def __getbuffer__(self, Py_buffer *info, int flags):
10210 : * if flags & PyBUF_WRITABLE and self.view.readonly: # <<<<<<<<<<<<<<
10211 : * raise ValueError, "Cannot create writable memory view from read-only memoryview"
10212 : *
10213 : */
10214 : }
10215 :
10216 : /* "View.MemoryView":526
10217 : * raise ValueError, "Cannot create writable memory view from read-only memoryview"
10218 : *
10219 : * if flags & PyBUF_ND: # <<<<<<<<<<<<<<
10220 : * info.shape = self.view.shape
10221 : * else:
10222 : */
10223 0 : __pyx_t_1 = ((__pyx_v_flags & PyBUF_ND) != 0);
10224 0 : if (__pyx_t_1) {
10225 :
10226 : /* "View.MemoryView":527
10227 : *
10228 : * if flags & PyBUF_ND:
10229 : * info.shape = self.view.shape # <<<<<<<<<<<<<<
10230 : * else:
10231 : * info.shape = NULL
10232 : */
10233 0 : __pyx_t_3 = __pyx_v_self->view.shape;
10234 0 : __pyx_v_info->shape = __pyx_t_3;
10235 :
10236 : /* "View.MemoryView":526
10237 : * raise ValueError, "Cannot create writable memory view from read-only memoryview"
10238 : *
10239 : * if flags & PyBUF_ND: # <<<<<<<<<<<<<<
10240 : * info.shape = self.view.shape
10241 : * else:
10242 : */
10243 0 : goto __pyx_L6;
10244 : }
10245 :
10246 : /* "View.MemoryView":529
10247 : * info.shape = self.view.shape
10248 : * else:
10249 : * info.shape = NULL # <<<<<<<<<<<<<<
10250 : *
10251 : * if flags & PyBUF_STRIDES:
10252 : */
10253 : /*else*/ {
10254 0 : __pyx_v_info->shape = NULL;
10255 : }
10256 0 : __pyx_L6:;
10257 :
10258 : /* "View.MemoryView":531
10259 : * info.shape = NULL
10260 : *
10261 : * if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<<
10262 : * info.strides = self.view.strides
10263 : * else:
10264 : */
10265 0 : __pyx_t_1 = ((__pyx_v_flags & PyBUF_STRIDES) != 0);
10266 0 : if (__pyx_t_1) {
10267 :
10268 : /* "View.MemoryView":532
10269 : *
10270 : * if flags & PyBUF_STRIDES:
10271 : * info.strides = self.view.strides # <<<<<<<<<<<<<<
10272 : * else:
10273 : * info.strides = NULL
10274 : */
10275 0 : __pyx_t_3 = __pyx_v_self->view.strides;
10276 0 : __pyx_v_info->strides = __pyx_t_3;
10277 :
10278 : /* "View.MemoryView":531
10279 : * info.shape = NULL
10280 : *
10281 : * if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<<
10282 : * info.strides = self.view.strides
10283 : * else:
10284 : */
10285 0 : goto __pyx_L7;
10286 : }
10287 :
10288 : /* "View.MemoryView":534
10289 : * info.strides = self.view.strides
10290 : * else:
10291 : * info.strides = NULL # <<<<<<<<<<<<<<
10292 : *
10293 : * if flags & PyBUF_INDIRECT:
10294 : */
10295 : /*else*/ {
10296 0 : __pyx_v_info->strides = NULL;
10297 : }
10298 0 : __pyx_L7:;
10299 :
10300 : /* "View.MemoryView":536
10301 : * info.strides = NULL
10302 : *
10303 : * if flags & PyBUF_INDIRECT: # <<<<<<<<<<<<<<
10304 : * info.suboffsets = self.view.suboffsets
10305 : * else:
10306 : */
10307 0 : __pyx_t_1 = ((__pyx_v_flags & PyBUF_INDIRECT) != 0);
10308 0 : if (__pyx_t_1) {
10309 :
10310 : /* "View.MemoryView":537
10311 : *
10312 : * if flags & PyBUF_INDIRECT:
10313 : * info.suboffsets = self.view.suboffsets # <<<<<<<<<<<<<<
10314 : * else:
10315 : * info.suboffsets = NULL
10316 : */
10317 0 : __pyx_t_3 = __pyx_v_self->view.suboffsets;
10318 0 : __pyx_v_info->suboffsets = __pyx_t_3;
10319 :
10320 : /* "View.MemoryView":536
10321 : * info.strides = NULL
10322 : *
10323 : * if flags & PyBUF_INDIRECT: # <<<<<<<<<<<<<<
10324 : * info.suboffsets = self.view.suboffsets
10325 : * else:
10326 : */
10327 0 : goto __pyx_L8;
10328 : }
10329 :
10330 : /* "View.MemoryView":539
10331 : * info.suboffsets = self.view.suboffsets
10332 : * else:
10333 : * info.suboffsets = NULL # <<<<<<<<<<<<<<
10334 : *
10335 : * if flags & PyBUF_FORMAT:
10336 : */
10337 : /*else*/ {
10338 0 : __pyx_v_info->suboffsets = NULL;
10339 : }
10340 0 : __pyx_L8:;
10341 :
10342 : /* "View.MemoryView":541
10343 : * info.suboffsets = NULL
10344 : *
10345 : * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
10346 : * info.format = self.view.format
10347 : * else:
10348 : */
10349 0 : __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
10350 0 : if (__pyx_t_1) {
10351 :
10352 : /* "View.MemoryView":542
10353 : *
10354 : * if flags & PyBUF_FORMAT:
10355 : * info.format = self.view.format # <<<<<<<<<<<<<<
10356 : * else:
10357 : * info.format = NULL
10358 : */
10359 0 : __pyx_t_4 = __pyx_v_self->view.format;
10360 0 : __pyx_v_info->format = __pyx_t_4;
10361 :
10362 : /* "View.MemoryView":541
10363 : * info.suboffsets = NULL
10364 : *
10365 : * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
10366 : * info.format = self.view.format
10367 : * else:
10368 : */
10369 0 : goto __pyx_L9;
10370 : }
10371 :
10372 : /* "View.MemoryView":544
10373 : * info.format = self.view.format
10374 : * else:
10375 : * info.format = NULL # <<<<<<<<<<<<<<
10376 : *
10377 : * info.buf = self.view.buf
10378 : */
10379 : /*else*/ {
10380 0 : __pyx_v_info->format = NULL;
10381 : }
10382 0 : __pyx_L9:;
10383 :
10384 : /* "View.MemoryView":546
10385 : * info.format = NULL
10386 : *
10387 : * info.buf = self.view.buf # <<<<<<<<<<<<<<
10388 : * info.ndim = self.view.ndim
10389 : * info.itemsize = self.view.itemsize
10390 : */
10391 0 : __pyx_t_5 = __pyx_v_self->view.buf;
10392 0 : __pyx_v_info->buf = __pyx_t_5;
10393 :
10394 : /* "View.MemoryView":547
10395 : *
10396 : * info.buf = self.view.buf
10397 : * info.ndim = self.view.ndim # <<<<<<<<<<<<<<
10398 : * info.itemsize = self.view.itemsize
10399 : * info.len = self.view.len
10400 : */
10401 0 : __pyx_t_6 = __pyx_v_self->view.ndim;
10402 0 : __pyx_v_info->ndim = __pyx_t_6;
10403 :
10404 : /* "View.MemoryView":548
10405 : * info.buf = self.view.buf
10406 : * info.ndim = self.view.ndim
10407 : * info.itemsize = self.view.itemsize # <<<<<<<<<<<<<<
10408 : * info.len = self.view.len
10409 : * info.readonly = self.view.readonly
10410 : */
10411 0 : __pyx_t_7 = __pyx_v_self->view.itemsize;
10412 0 : __pyx_v_info->itemsize = __pyx_t_7;
10413 :
10414 : /* "View.MemoryView":549
10415 : * info.ndim = self.view.ndim
10416 : * info.itemsize = self.view.itemsize
10417 : * info.len = self.view.len # <<<<<<<<<<<<<<
10418 : * info.readonly = self.view.readonly
10419 : * info.obj = self
10420 : */
10421 0 : __pyx_t_7 = __pyx_v_self->view.len;
10422 0 : __pyx_v_info->len = __pyx_t_7;
10423 :
10424 : /* "View.MemoryView":550
10425 : * info.itemsize = self.view.itemsize
10426 : * info.len = self.view.len
10427 : * info.readonly = self.view.readonly # <<<<<<<<<<<<<<
10428 : * info.obj = self
10429 : *
10430 : */
10431 0 : __pyx_t_1 = __pyx_v_self->view.readonly;
10432 0 : __pyx_v_info->readonly = __pyx_t_1;
10433 :
10434 : /* "View.MemoryView":551
10435 : * info.len = self.view.len
10436 : * info.readonly = self.view.readonly
10437 : * info.obj = self # <<<<<<<<<<<<<<
10438 : *
10439 : *
10440 : */
10441 0 : __Pyx_INCREF((PyObject *)__pyx_v_self);
10442 0 : __Pyx_GIVEREF((PyObject *)__pyx_v_self);
10443 0 : __Pyx_GOTREF(__pyx_v_info->obj);
10444 0 : __Pyx_DECREF(__pyx_v_info->obj);
10445 0 : __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
10446 :
10447 : /* "View.MemoryView":521
10448 : * itemp[i] = c
10449 : *
10450 : * @cname('getbuffer') # <<<<<<<<<<<<<<
10451 : * def __getbuffer__(self, Py_buffer *info, int flags):
10452 : * if flags & PyBUF_WRITABLE and self.view.readonly:
10453 : */
10454 :
10455 : /* function exit code */
10456 0 : __pyx_r = 0;
10457 0 : goto __pyx_L0;
10458 0 : __pyx_L1_error:;
10459 0 : __Pyx_AddTraceback("View.MemoryView.memoryview.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10460 0 : __pyx_r = -1;
10461 0 : if (__pyx_v_info->obj != NULL) {
10462 0 : __Pyx_GOTREF(__pyx_v_info->obj);
10463 0 : __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
10464 : }
10465 0 : goto __pyx_L2;
10466 0 : __pyx_L0:;
10467 0 : if (__pyx_v_info->obj == Py_None) {
10468 0 : __Pyx_GOTREF(__pyx_v_info->obj);
10469 0 : __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
10470 : }
10471 0 : __pyx_L2:;
10472 : __Pyx_RefNannyFinishContext();
10473 : return __pyx_r;
10474 : }
10475 :
10476 : /* "View.MemoryView":554
10477 : *
10478 : *
10479 : * @property # <<<<<<<<<<<<<<
10480 : * def T(self):
10481 : * cdef _memoryviewslice result = memoryview_copy(self)
10482 : */
10483 :
10484 : /* Python wrapper */
10485 : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self); /*proto*/
10486 0 : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self) {
10487 0 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
10488 0 : PyObject *__pyx_r = 0;
10489 : __Pyx_RefNannyDeclarations
10490 0 : __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
10491 0 : __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
10492 0 : __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
10493 :
10494 : /* function exit code */
10495 0 : __Pyx_RefNannyFinishContext();
10496 0 : return __pyx_r;
10497 : }
10498 :
10499 0 : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
10500 0 : struct __pyx_memoryviewslice_obj *__pyx_v_result = 0;
10501 0 : PyObject *__pyx_r = NULL;
10502 : __Pyx_RefNannyDeclarations
10503 0 : PyObject *__pyx_t_1 = NULL;
10504 0 : int __pyx_t_2;
10505 0 : int __pyx_lineno = 0;
10506 0 : const char *__pyx_filename = NULL;
10507 0 : int __pyx_clineno = 0;
10508 0 : __Pyx_RefNannySetupContext("__get__", 1);
10509 :
10510 : /* "View.MemoryView":556
10511 : * @property
10512 : * def T(self):
10513 : * cdef _memoryviewslice result = memoryview_copy(self) # <<<<<<<<<<<<<<
10514 : * transpose_memslice(&result.from_slice)
10515 : * return result
10516 : */
10517 0 : __pyx_t_1 = __pyx_memoryview_copy_object(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 556, __pyx_L1_error)
10518 0 : __Pyx_GOTREF(__pyx_t_1);
10519 0 : if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_memoryviewslice_type))))) __PYX_ERR(1, 556, __pyx_L1_error)
10520 0 : __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_1);
10521 0 : __pyx_t_1 = 0;
10522 :
10523 : /* "View.MemoryView":557
10524 : * def T(self):
10525 : * cdef _memoryviewslice result = memoryview_copy(self)
10526 : * transpose_memslice(&result.from_slice) # <<<<<<<<<<<<<<
10527 : * return result
10528 : *
10529 : */
10530 0 : __pyx_t_2 = __pyx_memslice_transpose((&__pyx_v_result->from_slice)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 557, __pyx_L1_error)
10531 :
10532 : /* "View.MemoryView":558
10533 : * cdef _memoryviewslice result = memoryview_copy(self)
10534 : * transpose_memslice(&result.from_slice)
10535 : * return result # <<<<<<<<<<<<<<
10536 : *
10537 : * @property
10538 : */
10539 0 : __Pyx_XDECREF(__pyx_r);
10540 0 : __Pyx_INCREF((PyObject *)__pyx_v_result);
10541 0 : __pyx_r = ((PyObject *)__pyx_v_result);
10542 0 : goto __pyx_L0;
10543 :
10544 : /* "View.MemoryView":554
10545 : *
10546 : *
10547 : * @property # <<<<<<<<<<<<<<
10548 : * def T(self):
10549 : * cdef _memoryviewslice result = memoryview_copy(self)
10550 : */
10551 :
10552 : /* function exit code */
10553 0 : __pyx_L1_error:;
10554 0 : __Pyx_XDECREF(__pyx_t_1);
10555 0 : __Pyx_AddTraceback("View.MemoryView.memoryview.T.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10556 0 : __pyx_r = NULL;
10557 0 : __pyx_L0:;
10558 0 : __Pyx_XDECREF((PyObject *)__pyx_v_result);
10559 0 : __Pyx_XGIVEREF(__pyx_r);
10560 0 : __Pyx_RefNannyFinishContext();
10561 0 : return __pyx_r;
10562 : }
10563 :
10564 : /* "View.MemoryView":560
10565 : * return result
10566 : *
10567 : * @property # <<<<<<<<<<<<<<
10568 : * def base(self):
10569 : * return self._get_base()
10570 : */
10571 :
10572 : /* Python wrapper */
10573 : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self); /*proto*/
10574 0 : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self) {
10575 0 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
10576 0 : PyObject *__pyx_r = 0;
10577 : __Pyx_RefNannyDeclarations
10578 0 : __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
10579 0 : __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
10580 0 : __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
10581 :
10582 : /* function exit code */
10583 0 : __Pyx_RefNannyFinishContext();
10584 0 : return __pyx_r;
10585 : }
10586 :
10587 0 : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
10588 0 : PyObject *__pyx_r = NULL;
10589 : __Pyx_RefNannyDeclarations
10590 0 : PyObject *__pyx_t_1 = NULL;
10591 0 : int __pyx_lineno = 0;
10592 0 : const char *__pyx_filename = NULL;
10593 0 : int __pyx_clineno = 0;
10594 0 : __Pyx_RefNannySetupContext("__get__", 1);
10595 :
10596 : /* "View.MemoryView":562
10597 : * @property
10598 : * def base(self):
10599 : * return self._get_base() # <<<<<<<<<<<<<<
10600 : *
10601 : * cdef _get_base(self):
10602 : */
10603 0 : __Pyx_XDECREF(__pyx_r);
10604 0 : __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->_get_base(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 562, __pyx_L1_error)
10605 0 : __Pyx_GOTREF(__pyx_t_1);
10606 0 : __pyx_r = __pyx_t_1;
10607 0 : __pyx_t_1 = 0;
10608 0 : goto __pyx_L0;
10609 :
10610 : /* "View.MemoryView":560
10611 : * return result
10612 : *
10613 : * @property # <<<<<<<<<<<<<<
10614 : * def base(self):
10615 : * return self._get_base()
10616 : */
10617 :
10618 : /* function exit code */
10619 0 : __pyx_L1_error:;
10620 0 : __Pyx_XDECREF(__pyx_t_1);
10621 0 : __Pyx_AddTraceback("View.MemoryView.memoryview.base.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10622 0 : __pyx_r = NULL;
10623 0 : __pyx_L0:;
10624 0 : __Pyx_XGIVEREF(__pyx_r);
10625 0 : __Pyx_RefNannyFinishContext();
10626 0 : return __pyx_r;
10627 : }
10628 :
10629 : /* "View.MemoryView":564
10630 : * return self._get_base()
10631 : *
10632 : * cdef _get_base(self): # <<<<<<<<<<<<<<
10633 : * return self.obj
10634 : *
10635 : */
10636 :
10637 0 : static PyObject *__pyx_memoryview__get_base(struct __pyx_memoryview_obj *__pyx_v_self) {
10638 0 : PyObject *__pyx_r = NULL;
10639 : __Pyx_RefNannyDeclarations
10640 0 : __Pyx_RefNannySetupContext("_get_base", 1);
10641 :
10642 : /* "View.MemoryView":565
10643 : *
10644 : * cdef _get_base(self):
10645 : * return self.obj # <<<<<<<<<<<<<<
10646 : *
10647 : * @property
10648 : */
10649 0 : __Pyx_XDECREF(__pyx_r);
10650 0 : __Pyx_INCREF(__pyx_v_self->obj);
10651 0 : __pyx_r = __pyx_v_self->obj;
10652 0 : goto __pyx_L0;
10653 :
10654 : /* "View.MemoryView":564
10655 : * return self._get_base()
10656 : *
10657 : * cdef _get_base(self): # <<<<<<<<<<<<<<
10658 : * return self.obj
10659 : *
10660 : */
10661 :
10662 : /* function exit code */
10663 0 : __pyx_L0:;
10664 0 : __Pyx_XGIVEREF(__pyx_r);
10665 0 : __Pyx_RefNannyFinishContext();
10666 0 : return __pyx_r;
10667 : }
10668 :
10669 : /* "View.MemoryView":567
10670 : * return self.obj
10671 : *
10672 : * @property # <<<<<<<<<<<<<<
10673 : * def shape(self):
10674 : * return tuple([length for length in self.view.shape[:self.view.ndim]])
10675 : */
10676 :
10677 : /* Python wrapper */
10678 : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self); /*proto*/
10679 0 : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self) {
10680 0 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
10681 0 : PyObject *__pyx_r = 0;
10682 : __Pyx_RefNannyDeclarations
10683 0 : __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
10684 0 : __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
10685 0 : __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
10686 :
10687 : /* function exit code */
10688 0 : __Pyx_RefNannyFinishContext();
10689 0 : return __pyx_r;
10690 : }
10691 :
10692 0 : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
10693 0 : Py_ssize_t __pyx_7genexpr__pyx_v_length;
10694 0 : PyObject *__pyx_r = NULL;
10695 : __Pyx_RefNannyDeclarations
10696 0 : PyObject *__pyx_t_1 = NULL;
10697 0 : Py_ssize_t *__pyx_t_2;
10698 0 : Py_ssize_t *__pyx_t_3;
10699 0 : Py_ssize_t *__pyx_t_4;
10700 0 : PyObject *__pyx_t_5 = NULL;
10701 0 : int __pyx_lineno = 0;
10702 0 : const char *__pyx_filename = NULL;
10703 0 : int __pyx_clineno = 0;
10704 0 : __Pyx_RefNannySetupContext("__get__", 1);
10705 :
10706 : /* "View.MemoryView":569
10707 : * @property
10708 : * def shape(self):
10709 : * return tuple([length for length in self.view.shape[:self.view.ndim]]) # <<<<<<<<<<<<<<
10710 : *
10711 : * @property
10712 : */
10713 0 : __Pyx_XDECREF(__pyx_r);
10714 : { /* enter inner scope */
10715 0 : __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 569, __pyx_L1_error)
10716 0 : __Pyx_GOTREF(__pyx_t_1);
10717 0 : __pyx_t_3 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim);
10718 0 : for (__pyx_t_4 = __pyx_v_self->view.shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {
10719 0 : __pyx_t_2 = __pyx_t_4;
10720 0 : __pyx_7genexpr__pyx_v_length = (__pyx_t_2[0]);
10721 0 : __pyx_t_5 = PyInt_FromSsize_t(__pyx_7genexpr__pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 569, __pyx_L1_error)
10722 0 : __Pyx_GOTREF(__pyx_t_5);
10723 0 : if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(1, 569, __pyx_L1_error)
10724 0 : __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
10725 : }
10726 : } /* exit inner scope */
10727 0 : __pyx_t_5 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 569, __pyx_L1_error)
10728 0 : __Pyx_GOTREF(__pyx_t_5);
10729 0 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10730 0 : __pyx_r = __pyx_t_5;
10731 0 : __pyx_t_5 = 0;
10732 0 : goto __pyx_L0;
10733 :
10734 : /* "View.MemoryView":567
10735 : * return self.obj
10736 : *
10737 : * @property # <<<<<<<<<<<<<<
10738 : * def shape(self):
10739 : * return tuple([length for length in self.view.shape[:self.view.ndim]])
10740 : */
10741 :
10742 : /* function exit code */
10743 0 : __pyx_L1_error:;
10744 0 : __Pyx_XDECREF(__pyx_t_1);
10745 0 : __Pyx_XDECREF(__pyx_t_5);
10746 0 : __Pyx_AddTraceback("View.MemoryView.memoryview.shape.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10747 0 : __pyx_r = NULL;
10748 0 : __pyx_L0:;
10749 0 : __Pyx_XGIVEREF(__pyx_r);
10750 0 : __Pyx_RefNannyFinishContext();
10751 0 : return __pyx_r;
10752 : }
10753 :
10754 : /* "View.MemoryView":571
10755 : * return tuple([length for length in self.view.shape[:self.view.ndim]])
10756 : *
10757 : * @property # <<<<<<<<<<<<<<
10758 : * def strides(self):
10759 : * if self.view.strides == NULL:
10760 : */
10761 :
10762 : /* Python wrapper */
10763 : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self); /*proto*/
10764 0 : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self) {
10765 0 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
10766 0 : PyObject *__pyx_r = 0;
10767 : __Pyx_RefNannyDeclarations
10768 0 : __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
10769 0 : __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
10770 0 : __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
10771 :
10772 : /* function exit code */
10773 0 : __Pyx_RefNannyFinishContext();
10774 0 : return __pyx_r;
10775 : }
10776 :
10777 0 : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
10778 0 : Py_ssize_t __pyx_8genexpr1__pyx_v_stride;
10779 0 : PyObject *__pyx_r = NULL;
10780 : __Pyx_RefNannyDeclarations
10781 0 : int __pyx_t_1;
10782 0 : PyObject *__pyx_t_2 = NULL;
10783 0 : Py_ssize_t *__pyx_t_3;
10784 0 : Py_ssize_t *__pyx_t_4;
10785 0 : Py_ssize_t *__pyx_t_5;
10786 0 : PyObject *__pyx_t_6 = NULL;
10787 0 : int __pyx_lineno = 0;
10788 0 : const char *__pyx_filename = NULL;
10789 0 : int __pyx_clineno = 0;
10790 0 : __Pyx_RefNannySetupContext("__get__", 1);
10791 :
10792 : /* "View.MemoryView":573
10793 : * @property
10794 : * def strides(self):
10795 : * if self.view.strides == NULL: # <<<<<<<<<<<<<<
10796 : *
10797 : * raise ValueError, "Buffer view does not expose strides"
10798 : */
10799 0 : __pyx_t_1 = (__pyx_v_self->view.strides == NULL);
10800 0 : if (unlikely(__pyx_t_1)) {
10801 :
10802 : /* "View.MemoryView":575
10803 : * if self.view.strides == NULL:
10804 : *
10805 : * raise ValueError, "Buffer view does not expose strides" # <<<<<<<<<<<<<<
10806 : *
10807 : * return tuple([stride for stride in self.view.strides[:self.view.ndim]])
10808 : */
10809 0 : __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Buffer_view_does_not_expose_stri, 0, 0);
10810 0 : __PYX_ERR(1, 575, __pyx_L1_error)
10811 :
10812 : /* "View.MemoryView":573
10813 : * @property
10814 : * def strides(self):
10815 : * if self.view.strides == NULL: # <<<<<<<<<<<<<<
10816 : *
10817 : * raise ValueError, "Buffer view does not expose strides"
10818 : */
10819 : }
10820 :
10821 : /* "View.MemoryView":577
10822 : * raise ValueError, "Buffer view does not expose strides"
10823 : *
10824 : * return tuple([stride for stride in self.view.strides[:self.view.ndim]]) # <<<<<<<<<<<<<<
10825 : *
10826 : * @property
10827 : */
10828 0 : __Pyx_XDECREF(__pyx_r);
10829 : { /* enter inner scope */
10830 0 : __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 577, __pyx_L1_error)
10831 0 : __Pyx_GOTREF(__pyx_t_2);
10832 0 : __pyx_t_4 = (__pyx_v_self->view.strides + __pyx_v_self->view.ndim);
10833 0 : for (__pyx_t_5 = __pyx_v_self->view.strides; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) {
10834 0 : __pyx_t_3 = __pyx_t_5;
10835 0 : __pyx_8genexpr1__pyx_v_stride = (__pyx_t_3[0]);
10836 0 : __pyx_t_6 = PyInt_FromSsize_t(__pyx_8genexpr1__pyx_v_stride); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 577, __pyx_L1_error)
10837 0 : __Pyx_GOTREF(__pyx_t_6);
10838 0 : if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(1, 577, __pyx_L1_error)
10839 0 : __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
10840 : }
10841 : } /* exit inner scope */
10842 0 : __pyx_t_6 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 577, __pyx_L1_error)
10843 0 : __Pyx_GOTREF(__pyx_t_6);
10844 0 : __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10845 0 : __pyx_r = __pyx_t_6;
10846 0 : __pyx_t_6 = 0;
10847 0 : goto __pyx_L0;
10848 :
10849 : /* "View.MemoryView":571
10850 : * return tuple([length for length in self.view.shape[:self.view.ndim]])
10851 : *
10852 : * @property # <<<<<<<<<<<<<<
10853 : * def strides(self):
10854 : * if self.view.strides == NULL:
10855 : */
10856 :
10857 : /* function exit code */
10858 0 : __pyx_L1_error:;
10859 0 : __Pyx_XDECREF(__pyx_t_2);
10860 0 : __Pyx_XDECREF(__pyx_t_6);
10861 0 : __Pyx_AddTraceback("View.MemoryView.memoryview.strides.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10862 0 : __pyx_r = NULL;
10863 0 : __pyx_L0:;
10864 0 : __Pyx_XGIVEREF(__pyx_r);
10865 0 : __Pyx_RefNannyFinishContext();
10866 0 : return __pyx_r;
10867 : }
10868 :
10869 : /* "View.MemoryView":579
10870 : * return tuple([stride for stride in self.view.strides[:self.view.ndim]])
10871 : *
10872 : * @property # <<<<<<<<<<<<<<
10873 : * def suboffsets(self):
10874 : * if self.view.suboffsets == NULL:
10875 : */
10876 :
10877 : /* Python wrapper */
10878 : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self); /*proto*/
10879 0 : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self) {
10880 0 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
10881 0 : PyObject *__pyx_r = 0;
10882 : __Pyx_RefNannyDeclarations
10883 0 : __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
10884 0 : __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
10885 0 : __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
10886 :
10887 : /* function exit code */
10888 0 : __Pyx_RefNannyFinishContext();
10889 0 : return __pyx_r;
10890 : }
10891 :
10892 0 : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
10893 0 : Py_ssize_t __pyx_8genexpr2__pyx_v_suboffset;
10894 0 : PyObject *__pyx_r = NULL;
10895 : __Pyx_RefNannyDeclarations
10896 0 : int __pyx_t_1;
10897 0 : PyObject *__pyx_t_2 = NULL;
10898 0 : Py_ssize_t *__pyx_t_3;
10899 0 : Py_ssize_t *__pyx_t_4;
10900 0 : Py_ssize_t *__pyx_t_5;
10901 0 : PyObject *__pyx_t_6 = NULL;
10902 0 : int __pyx_lineno = 0;
10903 0 : const char *__pyx_filename = NULL;
10904 0 : int __pyx_clineno = 0;
10905 0 : __Pyx_RefNannySetupContext("__get__", 1);
10906 :
10907 : /* "View.MemoryView":581
10908 : * @property
10909 : * def suboffsets(self):
10910 : * if self.view.suboffsets == NULL: # <<<<<<<<<<<<<<
10911 : * return (-1,) * self.view.ndim
10912 : *
10913 : */
10914 0 : __pyx_t_1 = (__pyx_v_self->view.suboffsets == NULL);
10915 0 : if (__pyx_t_1) {
10916 :
10917 : /* "View.MemoryView":582
10918 : * def suboffsets(self):
10919 : * if self.view.suboffsets == NULL:
10920 : * return (-1,) * self.view.ndim # <<<<<<<<<<<<<<
10921 : *
10922 : * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
10923 : */
10924 0 : __Pyx_XDECREF(__pyx_r);
10925 0 : __pyx_t_2 = __Pyx_PySequence_Multiply(__pyx_tuple__4, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 582, __pyx_L1_error)
10926 0 : __Pyx_GOTREF(__pyx_t_2);
10927 0 : __pyx_r = __pyx_t_2;
10928 0 : __pyx_t_2 = 0;
10929 0 : goto __pyx_L0;
10930 :
10931 : /* "View.MemoryView":581
10932 : * @property
10933 : * def suboffsets(self):
10934 : * if self.view.suboffsets == NULL: # <<<<<<<<<<<<<<
10935 : * return (-1,) * self.view.ndim
10936 : *
10937 : */
10938 : }
10939 :
10940 : /* "View.MemoryView":584
10941 : * return (-1,) * self.view.ndim
10942 : *
10943 : * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]]) # <<<<<<<<<<<<<<
10944 : *
10945 : * @property
10946 : */
10947 0 : __Pyx_XDECREF(__pyx_r);
10948 : { /* enter inner scope */
10949 0 : __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 584, __pyx_L1_error)
10950 0 : __Pyx_GOTREF(__pyx_t_2);
10951 0 : __pyx_t_4 = (__pyx_v_self->view.suboffsets + __pyx_v_self->view.ndim);
10952 0 : for (__pyx_t_5 = __pyx_v_self->view.suboffsets; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) {
10953 0 : __pyx_t_3 = __pyx_t_5;
10954 0 : __pyx_8genexpr2__pyx_v_suboffset = (__pyx_t_3[0]);
10955 0 : __pyx_t_6 = PyInt_FromSsize_t(__pyx_8genexpr2__pyx_v_suboffset); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 584, __pyx_L1_error)
10956 0 : __Pyx_GOTREF(__pyx_t_6);
10957 0 : if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(1, 584, __pyx_L1_error)
10958 0 : __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
10959 : }
10960 : } /* exit inner scope */
10961 0 : __pyx_t_6 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 584, __pyx_L1_error)
10962 0 : __Pyx_GOTREF(__pyx_t_6);
10963 0 : __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10964 0 : __pyx_r = __pyx_t_6;
10965 0 : __pyx_t_6 = 0;
10966 0 : goto __pyx_L0;
10967 :
10968 : /* "View.MemoryView":579
10969 : * return tuple([stride for stride in self.view.strides[:self.view.ndim]])
10970 : *
10971 : * @property # <<<<<<<<<<<<<<
10972 : * def suboffsets(self):
10973 : * if self.view.suboffsets == NULL:
10974 : */
10975 :
10976 : /* function exit code */
10977 0 : __pyx_L1_error:;
10978 0 : __Pyx_XDECREF(__pyx_t_2);
10979 0 : __Pyx_XDECREF(__pyx_t_6);
10980 0 : __Pyx_AddTraceback("View.MemoryView.memoryview.suboffsets.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10981 0 : __pyx_r = NULL;
10982 0 : __pyx_L0:;
10983 0 : __Pyx_XGIVEREF(__pyx_r);
10984 0 : __Pyx_RefNannyFinishContext();
10985 0 : return __pyx_r;
10986 : }
10987 :
10988 : /* "View.MemoryView":586
10989 : * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
10990 : *
10991 : * @property # <<<<<<<<<<<<<<
10992 : * def ndim(self):
10993 : * return self.view.ndim
10994 : */
10995 :
10996 : /* Python wrapper */
10997 : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self); /*proto*/
10998 0 : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self) {
10999 0 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
11000 0 : PyObject *__pyx_r = 0;
11001 : __Pyx_RefNannyDeclarations
11002 0 : __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
11003 0 : __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
11004 0 : __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
11005 :
11006 : /* function exit code */
11007 0 : __Pyx_RefNannyFinishContext();
11008 0 : return __pyx_r;
11009 : }
11010 :
11011 0 : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
11012 0 : PyObject *__pyx_r = NULL;
11013 : __Pyx_RefNannyDeclarations
11014 0 : PyObject *__pyx_t_1 = NULL;
11015 0 : int __pyx_lineno = 0;
11016 0 : const char *__pyx_filename = NULL;
11017 0 : int __pyx_clineno = 0;
11018 0 : __Pyx_RefNannySetupContext("__get__", 1);
11019 :
11020 : /* "View.MemoryView":588
11021 : * @property
11022 : * def ndim(self):
11023 : * return self.view.ndim # <<<<<<<<<<<<<<
11024 : *
11025 : * @property
11026 : */
11027 0 : __Pyx_XDECREF(__pyx_r);
11028 0 : __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 588, __pyx_L1_error)
11029 0 : __Pyx_GOTREF(__pyx_t_1);
11030 0 : __pyx_r = __pyx_t_1;
11031 0 : __pyx_t_1 = 0;
11032 0 : goto __pyx_L0;
11033 :
11034 : /* "View.MemoryView":586
11035 : * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
11036 : *
11037 : * @property # <<<<<<<<<<<<<<
11038 : * def ndim(self):
11039 : * return self.view.ndim
11040 : */
11041 :
11042 : /* function exit code */
11043 0 : __pyx_L1_error:;
11044 0 : __Pyx_XDECREF(__pyx_t_1);
11045 0 : __Pyx_AddTraceback("View.MemoryView.memoryview.ndim.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11046 0 : __pyx_r = NULL;
11047 0 : __pyx_L0:;
11048 0 : __Pyx_XGIVEREF(__pyx_r);
11049 0 : __Pyx_RefNannyFinishContext();
11050 0 : return __pyx_r;
11051 : }
11052 :
11053 : /* "View.MemoryView":590
11054 : * return self.view.ndim
11055 : *
11056 : * @property # <<<<<<<<<<<<<<
11057 : * def itemsize(self):
11058 : * return self.view.itemsize
11059 : */
11060 :
11061 : /* Python wrapper */
11062 : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self); /*proto*/
11063 0 : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self) {
11064 0 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
11065 0 : PyObject *__pyx_r = 0;
11066 : __Pyx_RefNannyDeclarations
11067 0 : __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
11068 0 : __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
11069 0 : __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
11070 :
11071 : /* function exit code */
11072 0 : __Pyx_RefNannyFinishContext();
11073 0 : return __pyx_r;
11074 : }
11075 :
11076 0 : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
11077 0 : PyObject *__pyx_r = NULL;
11078 : __Pyx_RefNannyDeclarations
11079 0 : PyObject *__pyx_t_1 = NULL;
11080 0 : int __pyx_lineno = 0;
11081 0 : const char *__pyx_filename = NULL;
11082 0 : int __pyx_clineno = 0;
11083 0 : __Pyx_RefNannySetupContext("__get__", 1);
11084 :
11085 : /* "View.MemoryView":592
11086 : * @property
11087 : * def itemsize(self):
11088 : * return self.view.itemsize # <<<<<<<<<<<<<<
11089 : *
11090 : * @property
11091 : */
11092 0 : __Pyx_XDECREF(__pyx_r);
11093 0 : __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 592, __pyx_L1_error)
11094 0 : __Pyx_GOTREF(__pyx_t_1);
11095 0 : __pyx_r = __pyx_t_1;
11096 0 : __pyx_t_1 = 0;
11097 0 : goto __pyx_L0;
11098 :
11099 : /* "View.MemoryView":590
11100 : * return self.view.ndim
11101 : *
11102 : * @property # <<<<<<<<<<<<<<
11103 : * def itemsize(self):
11104 : * return self.view.itemsize
11105 : */
11106 :
11107 : /* function exit code */
11108 0 : __pyx_L1_error:;
11109 0 : __Pyx_XDECREF(__pyx_t_1);
11110 0 : __Pyx_AddTraceback("View.MemoryView.memoryview.itemsize.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11111 0 : __pyx_r = NULL;
11112 0 : __pyx_L0:;
11113 0 : __Pyx_XGIVEREF(__pyx_r);
11114 0 : __Pyx_RefNannyFinishContext();
11115 0 : return __pyx_r;
11116 : }
11117 :
11118 : /* "View.MemoryView":594
11119 : * return self.view.itemsize
11120 : *
11121 : * @property # <<<<<<<<<<<<<<
11122 : * def nbytes(self):
11123 : * return self.size * self.view.itemsize
11124 : */
11125 :
11126 : /* Python wrapper */
11127 : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self); /*proto*/
11128 0 : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self) {
11129 0 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
11130 0 : PyObject *__pyx_r = 0;
11131 : __Pyx_RefNannyDeclarations
11132 0 : __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
11133 0 : __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
11134 0 : __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
11135 :
11136 : /* function exit code */
11137 0 : __Pyx_RefNannyFinishContext();
11138 0 : return __pyx_r;
11139 : }
11140 :
11141 0 : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
11142 0 : PyObject *__pyx_r = NULL;
11143 : __Pyx_RefNannyDeclarations
11144 0 : PyObject *__pyx_t_1 = NULL;
11145 0 : PyObject *__pyx_t_2 = NULL;
11146 0 : PyObject *__pyx_t_3 = NULL;
11147 0 : int __pyx_lineno = 0;
11148 0 : const char *__pyx_filename = NULL;
11149 0 : int __pyx_clineno = 0;
11150 0 : __Pyx_RefNannySetupContext("__get__", 1);
11151 :
11152 : /* "View.MemoryView":596
11153 : * @property
11154 : * def nbytes(self):
11155 : * return self.size * self.view.itemsize # <<<<<<<<<<<<<<
11156 : *
11157 : * @property
11158 : */
11159 0 : __Pyx_XDECREF(__pyx_r);
11160 0 : __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 596, __pyx_L1_error)
11161 0 : __Pyx_GOTREF(__pyx_t_1);
11162 0 : __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 596, __pyx_L1_error)
11163 0 : __Pyx_GOTREF(__pyx_t_2);
11164 0 : __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 596, __pyx_L1_error)
11165 0 : __Pyx_GOTREF(__pyx_t_3);
11166 0 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11167 0 : __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11168 0 : __pyx_r = __pyx_t_3;
11169 0 : __pyx_t_3 = 0;
11170 0 : goto __pyx_L0;
11171 :
11172 : /* "View.MemoryView":594
11173 : * return self.view.itemsize
11174 : *
11175 : * @property # <<<<<<<<<<<<<<
11176 : * def nbytes(self):
11177 : * return self.size * self.view.itemsize
11178 : */
11179 :
11180 : /* function exit code */
11181 0 : __pyx_L1_error:;
11182 0 : __Pyx_XDECREF(__pyx_t_1);
11183 0 : __Pyx_XDECREF(__pyx_t_2);
11184 0 : __Pyx_XDECREF(__pyx_t_3);
11185 0 : __Pyx_AddTraceback("View.MemoryView.memoryview.nbytes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11186 0 : __pyx_r = NULL;
11187 0 : __pyx_L0:;
11188 0 : __Pyx_XGIVEREF(__pyx_r);
11189 0 : __Pyx_RefNannyFinishContext();
11190 0 : return __pyx_r;
11191 : }
11192 :
11193 : /* "View.MemoryView":598
11194 : * return self.size * self.view.itemsize
11195 : *
11196 : * @property # <<<<<<<<<<<<<<
11197 : * def size(self):
11198 : * if self._size is None:
11199 : */
11200 :
11201 : /* Python wrapper */
11202 : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self); /*proto*/
11203 0 : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self) {
11204 0 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
11205 0 : PyObject *__pyx_r = 0;
11206 : __Pyx_RefNannyDeclarations
11207 0 : __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
11208 0 : __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
11209 0 : __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
11210 :
11211 : /* function exit code */
11212 0 : __Pyx_RefNannyFinishContext();
11213 0 : return __pyx_r;
11214 : }
11215 :
11216 0 : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
11217 0 : PyObject *__pyx_v_result = NULL;
11218 0 : PyObject *__pyx_v_length = NULL;
11219 0 : PyObject *__pyx_r = NULL;
11220 : __Pyx_RefNannyDeclarations
11221 0 : int __pyx_t_1;
11222 0 : Py_ssize_t *__pyx_t_2;
11223 0 : Py_ssize_t *__pyx_t_3;
11224 0 : Py_ssize_t *__pyx_t_4;
11225 0 : PyObject *__pyx_t_5 = NULL;
11226 0 : int __pyx_lineno = 0;
11227 0 : const char *__pyx_filename = NULL;
11228 0 : int __pyx_clineno = 0;
11229 0 : __Pyx_RefNannySetupContext("__get__", 1);
11230 :
11231 : /* "View.MemoryView":600
11232 : * @property
11233 : * def size(self):
11234 : * if self._size is None: # <<<<<<<<<<<<<<
11235 : * result = 1
11236 : *
11237 : */
11238 0 : __pyx_t_1 = (__pyx_v_self->_size == Py_None);
11239 0 : if (__pyx_t_1) {
11240 :
11241 : /* "View.MemoryView":601
11242 : * def size(self):
11243 : * if self._size is None:
11244 : * result = 1 # <<<<<<<<<<<<<<
11245 : *
11246 : * for length in self.view.shape[:self.view.ndim]:
11247 : */
11248 0 : __Pyx_INCREF(__pyx_int_1);
11249 0 : __pyx_v_result = __pyx_int_1;
11250 :
11251 : /* "View.MemoryView":603
11252 : * result = 1
11253 : *
11254 : * for length in self.view.shape[:self.view.ndim]: # <<<<<<<<<<<<<<
11255 : * result *= length
11256 : *
11257 : */
11258 0 : __pyx_t_3 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim);
11259 0 : for (__pyx_t_4 = __pyx_v_self->view.shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {
11260 0 : __pyx_t_2 = __pyx_t_4;
11261 0 : __pyx_t_5 = PyInt_FromSsize_t((__pyx_t_2[0])); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 603, __pyx_L1_error)
11262 0 : __Pyx_GOTREF(__pyx_t_5);
11263 0 : __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_5);
11264 0 : __pyx_t_5 = 0;
11265 :
11266 : /* "View.MemoryView":604
11267 : *
11268 : * for length in self.view.shape[:self.view.ndim]:
11269 : * result *= length # <<<<<<<<<<<<<<
11270 : *
11271 : * self._size = result
11272 : */
11273 0 : __pyx_t_5 = PyNumber_InPlaceMultiply(__pyx_v_result, __pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 604, __pyx_L1_error)
11274 0 : __Pyx_GOTREF(__pyx_t_5);
11275 0 : __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_5);
11276 0 : __pyx_t_5 = 0;
11277 : }
11278 :
11279 : /* "View.MemoryView":606
11280 : * result *= length
11281 : *
11282 : * self._size = result # <<<<<<<<<<<<<<
11283 : *
11284 : * return self._size
11285 : */
11286 0 : __Pyx_INCREF(__pyx_v_result);
11287 0 : __Pyx_GIVEREF(__pyx_v_result);
11288 0 : __Pyx_GOTREF(__pyx_v_self->_size);
11289 0 : __Pyx_DECREF(__pyx_v_self->_size);
11290 0 : __pyx_v_self->_size = __pyx_v_result;
11291 :
11292 : /* "View.MemoryView":600
11293 : * @property
11294 : * def size(self):
11295 : * if self._size is None: # <<<<<<<<<<<<<<
11296 : * result = 1
11297 : *
11298 : */
11299 : }
11300 :
11301 : /* "View.MemoryView":608
11302 : * self._size = result
11303 : *
11304 : * return self._size # <<<<<<<<<<<<<<
11305 : *
11306 : * def __len__(self):
11307 : */
11308 0 : __Pyx_XDECREF(__pyx_r);
11309 0 : __Pyx_INCREF(__pyx_v_self->_size);
11310 0 : __pyx_r = __pyx_v_self->_size;
11311 0 : goto __pyx_L0;
11312 :
11313 : /* "View.MemoryView":598
11314 : * return self.size * self.view.itemsize
11315 : *
11316 : * @property # <<<<<<<<<<<<<<
11317 : * def size(self):
11318 : * if self._size is None:
11319 : */
11320 :
11321 : /* function exit code */
11322 0 : __pyx_L1_error:;
11323 0 : __Pyx_XDECREF(__pyx_t_5);
11324 0 : __Pyx_AddTraceback("View.MemoryView.memoryview.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11325 0 : __pyx_r = NULL;
11326 0 : __pyx_L0:;
11327 0 : __Pyx_XDECREF(__pyx_v_result);
11328 0 : __Pyx_XDECREF(__pyx_v_length);
11329 0 : __Pyx_XGIVEREF(__pyx_r);
11330 0 : __Pyx_RefNannyFinishContext();
11331 0 : return __pyx_r;
11332 : }
11333 :
11334 : /* "View.MemoryView":610
11335 : * return self._size
11336 : *
11337 : * def __len__(self): # <<<<<<<<<<<<<<
11338 : * if self.view.ndim >= 1:
11339 : * return self.view.shape[0]
11340 : */
11341 :
11342 : /* Python wrapper */
11343 : static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self); /*proto*/
11344 0 : static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self) {
11345 0 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
11346 0 : Py_ssize_t __pyx_r;
11347 : __Pyx_RefNannyDeclarations
11348 0 : __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
11349 0 : __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
11350 0 : __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(((struct __pyx_memoryview_obj *)__pyx_v_self));
11351 :
11352 : /* function exit code */
11353 0 : __Pyx_RefNannyFinishContext();
11354 0 : return __pyx_r;
11355 : }
11356 :
11357 0 : static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self) {
11358 0 : Py_ssize_t __pyx_r;
11359 0 : int __pyx_t_1;
11360 :
11361 : /* "View.MemoryView":611
11362 : *
11363 : * def __len__(self):
11364 : * if self.view.ndim >= 1: # <<<<<<<<<<<<<<
11365 : * return self.view.shape[0]
11366 : *
11367 : */
11368 0 : __pyx_t_1 = (__pyx_v_self->view.ndim >= 1);
11369 0 : if (__pyx_t_1) {
11370 :
11371 : /* "View.MemoryView":612
11372 : * def __len__(self):
11373 : * if self.view.ndim >= 1:
11374 : * return self.view.shape[0] # <<<<<<<<<<<<<<
11375 : *
11376 : * return 0
11377 : */
11378 0 : __pyx_r = (__pyx_v_self->view.shape[0]);
11379 0 : goto __pyx_L0;
11380 :
11381 : /* "View.MemoryView":611
11382 : *
11383 : * def __len__(self):
11384 : * if self.view.ndim >= 1: # <<<<<<<<<<<<<<
11385 : * return self.view.shape[0]
11386 : *
11387 : */
11388 : }
11389 :
11390 : /* "View.MemoryView":614
11391 : * return self.view.shape[0]
11392 : *
11393 : * return 0 # <<<<<<<<<<<<<<
11394 : *
11395 : * def __repr__(self):
11396 : */
11397 0 : __pyx_r = 0;
11398 0 : goto __pyx_L0;
11399 :
11400 : /* "View.MemoryView":610
11401 : * return self._size
11402 : *
11403 : * def __len__(self): # <<<<<<<<<<<<<<
11404 : * if self.view.ndim >= 1:
11405 : * return self.view.shape[0]
11406 : */
11407 :
11408 : /* function exit code */
11409 0 : __pyx_L0:;
11410 0 : return __pyx_r;
11411 : }
11412 :
11413 : /* "View.MemoryView":616
11414 : * return 0
11415 : *
11416 : * def __repr__(self): # <<<<<<<<<<<<<<
11417 : * return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
11418 : * id(self))
11419 : */
11420 :
11421 : /* Python wrapper */
11422 : static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self); /*proto*/
11423 0 : static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self) {
11424 0 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
11425 0 : PyObject *__pyx_r = 0;
11426 : __Pyx_RefNannyDeclarations
11427 0 : __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
11428 0 : __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
11429 0 : __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(((struct __pyx_memoryview_obj *)__pyx_v_self));
11430 :
11431 : /* function exit code */
11432 0 : __Pyx_RefNannyFinishContext();
11433 0 : return __pyx_r;
11434 : }
11435 :
11436 0 : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self) {
11437 0 : PyObject *__pyx_r = NULL;
11438 : __Pyx_RefNannyDeclarations
11439 0 : PyObject *__pyx_t_1 = NULL;
11440 0 : PyObject *__pyx_t_2 = NULL;
11441 0 : PyObject *__pyx_t_3 = NULL;
11442 0 : int __pyx_lineno = 0;
11443 0 : const char *__pyx_filename = NULL;
11444 0 : int __pyx_clineno = 0;
11445 0 : __Pyx_RefNannySetupContext("__repr__", 1);
11446 :
11447 : /* "View.MemoryView":617
11448 : *
11449 : * def __repr__(self):
11450 : * return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__, # <<<<<<<<<<<<<<
11451 : * id(self))
11452 : *
11453 : */
11454 0 : __Pyx_XDECREF(__pyx_r);
11455 0 : __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 617, __pyx_L1_error)
11456 0 : __Pyx_GOTREF(__pyx_t_1);
11457 0 : __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 617, __pyx_L1_error)
11458 0 : __Pyx_GOTREF(__pyx_t_2);
11459 0 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11460 0 : __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 617, __pyx_L1_error)
11461 0 : __Pyx_GOTREF(__pyx_t_1);
11462 0 : __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11463 :
11464 : /* "View.MemoryView":618
11465 : * def __repr__(self):
11466 : * return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
11467 : * id(self)) # <<<<<<<<<<<<<<
11468 : *
11469 : * def __str__(self):
11470 : */
11471 0 : __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 618, __pyx_L1_error)
11472 0 : __Pyx_GOTREF(__pyx_t_2);
11473 :
11474 : /* "View.MemoryView":617
11475 : *
11476 : * def __repr__(self):
11477 : * return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__, # <<<<<<<<<<<<<<
11478 : * id(self))
11479 : *
11480 : */
11481 0 : __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 617, __pyx_L1_error)
11482 0 : __Pyx_GOTREF(__pyx_t_3);
11483 0 : __Pyx_GIVEREF(__pyx_t_1);
11484 0 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(1, 617, __pyx_L1_error);
11485 0 : __Pyx_GIVEREF(__pyx_t_2);
11486 0 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(1, 617, __pyx_L1_error);
11487 0 : __pyx_t_1 = 0;
11488 0 : __pyx_t_2 = 0;
11489 0 : __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_at_0x_x, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 617, __pyx_L1_error)
11490 0 : __Pyx_GOTREF(__pyx_t_2);
11491 0 : __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11492 0 : __pyx_r = __pyx_t_2;
11493 0 : __pyx_t_2 = 0;
11494 0 : goto __pyx_L0;
11495 :
11496 : /* "View.MemoryView":616
11497 : * return 0
11498 : *
11499 : * def __repr__(self): # <<<<<<<<<<<<<<
11500 : * return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
11501 : * id(self))
11502 : */
11503 :
11504 : /* function exit code */
11505 0 : __pyx_L1_error:;
11506 0 : __Pyx_XDECREF(__pyx_t_1);
11507 0 : __Pyx_XDECREF(__pyx_t_2);
11508 0 : __Pyx_XDECREF(__pyx_t_3);
11509 0 : __Pyx_AddTraceback("View.MemoryView.memoryview.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11510 0 : __pyx_r = NULL;
11511 0 : __pyx_L0:;
11512 0 : __Pyx_XGIVEREF(__pyx_r);
11513 0 : __Pyx_RefNannyFinishContext();
11514 0 : return __pyx_r;
11515 : }
11516 :
11517 : /* "View.MemoryView":620
11518 : * id(self))
11519 : *
11520 : * def __str__(self): # <<<<<<<<<<<<<<
11521 : * return "<MemoryView of %r object>" % (self.base.__class__.__name__,)
11522 : *
11523 : */
11524 :
11525 : /* Python wrapper */
11526 : static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self); /*proto*/
11527 0 : static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self) {
11528 0 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
11529 0 : PyObject *__pyx_r = 0;
11530 : __Pyx_RefNannyDeclarations
11531 0 : __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
11532 0 : __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
11533 0 : __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(((struct __pyx_memoryview_obj *)__pyx_v_self));
11534 :
11535 : /* function exit code */
11536 0 : __Pyx_RefNannyFinishContext();
11537 0 : return __pyx_r;
11538 : }
11539 :
11540 0 : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self) {
11541 0 : PyObject *__pyx_r = NULL;
11542 : __Pyx_RefNannyDeclarations
11543 0 : PyObject *__pyx_t_1 = NULL;
11544 0 : PyObject *__pyx_t_2 = NULL;
11545 0 : int __pyx_lineno = 0;
11546 0 : const char *__pyx_filename = NULL;
11547 0 : int __pyx_clineno = 0;
11548 0 : __Pyx_RefNannySetupContext("__str__", 1);
11549 :
11550 : /* "View.MemoryView":621
11551 : *
11552 : * def __str__(self):
11553 : * return "<MemoryView of %r object>" % (self.base.__class__.__name__,) # <<<<<<<<<<<<<<
11554 : *
11555 : *
11556 : */
11557 0 : __Pyx_XDECREF(__pyx_r);
11558 0 : __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 621, __pyx_L1_error)
11559 0 : __Pyx_GOTREF(__pyx_t_1);
11560 0 : __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 621, __pyx_L1_error)
11561 0 : __Pyx_GOTREF(__pyx_t_2);
11562 0 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11563 0 : __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 621, __pyx_L1_error)
11564 0 : __Pyx_GOTREF(__pyx_t_1);
11565 0 : __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11566 0 : __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 621, __pyx_L1_error)
11567 0 : __Pyx_GOTREF(__pyx_t_2);
11568 0 : __Pyx_GIVEREF(__pyx_t_1);
11569 0 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(1, 621, __pyx_L1_error);
11570 0 : __pyx_t_1 = 0;
11571 0 : __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_object, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 621, __pyx_L1_error)
11572 0 : __Pyx_GOTREF(__pyx_t_1);
11573 0 : __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11574 0 : __pyx_r = __pyx_t_1;
11575 0 : __pyx_t_1 = 0;
11576 0 : goto __pyx_L0;
11577 :
11578 : /* "View.MemoryView":620
11579 : * id(self))
11580 : *
11581 : * def __str__(self): # <<<<<<<<<<<<<<
11582 : * return "<MemoryView of %r object>" % (self.base.__class__.__name__,)
11583 : *
11584 : */
11585 :
11586 : /* function exit code */
11587 0 : __pyx_L1_error:;
11588 0 : __Pyx_XDECREF(__pyx_t_1);
11589 0 : __Pyx_XDECREF(__pyx_t_2);
11590 0 : __Pyx_AddTraceback("View.MemoryView.memoryview.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11591 0 : __pyx_r = NULL;
11592 0 : __pyx_L0:;
11593 0 : __Pyx_XGIVEREF(__pyx_r);
11594 0 : __Pyx_RefNannyFinishContext();
11595 0 : return __pyx_r;
11596 : }
11597 :
11598 : /* "View.MemoryView":624
11599 : *
11600 : *
11601 : * def is_c_contig(self): # <<<<<<<<<<<<<<
11602 : * cdef __Pyx_memviewslice *mslice
11603 : * cdef __Pyx_memviewslice tmp
11604 : */
11605 :
11606 : /* Python wrapper */
11607 : static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self,
11608 : #if CYTHON_METH_FASTCALL
11609 : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
11610 : #else
11611 : PyObject *__pyx_args, PyObject *__pyx_kwds
11612 : #endif
11613 : ); /*proto*/
11614 0 : static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self,
11615 : #if CYTHON_METH_FASTCALL
11616 : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
11617 : #else
11618 : PyObject *__pyx_args, PyObject *__pyx_kwds
11619 : #endif
11620 : ) {
11621 : #if !CYTHON_METH_FASTCALL
11622 : CYTHON_UNUSED Py_ssize_t __pyx_nargs;
11623 : #endif
11624 0 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
11625 0 : PyObject *__pyx_r = 0;
11626 : __Pyx_RefNannyDeclarations
11627 0 : __Pyx_RefNannySetupContext("is_c_contig (wrapper)", 0);
11628 : #if !CYTHON_METH_FASTCALL
11629 : #if CYTHON_ASSUME_SAFE_MACROS
11630 : __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
11631 : #else
11632 : __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
11633 : #endif
11634 : #endif
11635 0 : __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
11636 0 : if (unlikely(__pyx_nargs > 0)) {
11637 0 : __Pyx_RaiseArgtupleInvalid("is_c_contig", 1, 0, 0, __pyx_nargs); return NULL;}
11638 0 : if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "is_c_contig", 0))) return NULL;
11639 0 : __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(((struct __pyx_memoryview_obj *)__pyx_v_self));
11640 :
11641 : /* function exit code */
11642 0 : __Pyx_RefNannyFinishContext();
11643 0 : return __pyx_r;
11644 : }
11645 :
11646 0 : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self) {
11647 0 : __Pyx_memviewslice *__pyx_v_mslice;
11648 0 : __Pyx_memviewslice __pyx_v_tmp;
11649 0 : PyObject *__pyx_r = NULL;
11650 : __Pyx_RefNannyDeclarations
11651 0 : __Pyx_memviewslice *__pyx_t_1;
11652 0 : PyObject *__pyx_t_2 = NULL;
11653 0 : int __pyx_lineno = 0;
11654 0 : const char *__pyx_filename = NULL;
11655 0 : int __pyx_clineno = 0;
11656 0 : __Pyx_RefNannySetupContext("is_c_contig", 1);
11657 :
11658 : /* "View.MemoryView":627
11659 : * cdef __Pyx_memviewslice *mslice
11660 : * cdef __Pyx_memviewslice tmp
11661 : * mslice = get_slice_from_memview(self, &tmp) # <<<<<<<<<<<<<<
11662 : * return slice_is_contig(mslice[0], 'C', self.view.ndim)
11663 : *
11664 : */
11665 0 : __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 627, __pyx_L1_error)
11666 0 : __pyx_v_mslice = __pyx_t_1;
11667 :
11668 : /* "View.MemoryView":628
11669 : * cdef __Pyx_memviewslice tmp
11670 : * mslice = get_slice_from_memview(self, &tmp)
11671 : * return slice_is_contig(mslice[0], 'C', self.view.ndim) # <<<<<<<<<<<<<<
11672 : *
11673 : * def is_f_contig(self):
11674 : */
11675 0 : __Pyx_XDECREF(__pyx_r);
11676 0 : __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'C', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 628, __pyx_L1_error)
11677 0 : __Pyx_GOTREF(__pyx_t_2);
11678 0 : __pyx_r = __pyx_t_2;
11679 0 : __pyx_t_2 = 0;
11680 0 : goto __pyx_L0;
11681 :
11682 : /* "View.MemoryView":624
11683 : *
11684 : *
11685 : * def is_c_contig(self): # <<<<<<<<<<<<<<
11686 : * cdef __Pyx_memviewslice *mslice
11687 : * cdef __Pyx_memviewslice tmp
11688 : */
11689 :
11690 : /* function exit code */
11691 0 : __pyx_L1_error:;
11692 0 : __Pyx_XDECREF(__pyx_t_2);
11693 0 : __Pyx_AddTraceback("View.MemoryView.memoryview.is_c_contig", __pyx_clineno, __pyx_lineno, __pyx_filename);
11694 0 : __pyx_r = NULL;
11695 0 : __pyx_L0:;
11696 0 : __Pyx_XGIVEREF(__pyx_r);
11697 0 : __Pyx_RefNannyFinishContext();
11698 0 : return __pyx_r;
11699 : }
11700 :
11701 : /* "View.MemoryView":630
11702 : * return slice_is_contig(mslice[0], 'C', self.view.ndim)
11703 : *
11704 : * def is_f_contig(self): # <<<<<<<<<<<<<<
11705 : * cdef __Pyx_memviewslice *mslice
11706 : * cdef __Pyx_memviewslice tmp
11707 : */
11708 :
11709 : /* Python wrapper */
11710 : static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self,
11711 : #if CYTHON_METH_FASTCALL
11712 : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
11713 : #else
11714 : PyObject *__pyx_args, PyObject *__pyx_kwds
11715 : #endif
11716 : ); /*proto*/
11717 0 : static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self,
11718 : #if CYTHON_METH_FASTCALL
11719 : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
11720 : #else
11721 : PyObject *__pyx_args, PyObject *__pyx_kwds
11722 : #endif
11723 : ) {
11724 : #if !CYTHON_METH_FASTCALL
11725 : CYTHON_UNUSED Py_ssize_t __pyx_nargs;
11726 : #endif
11727 0 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
11728 0 : PyObject *__pyx_r = 0;
11729 : __Pyx_RefNannyDeclarations
11730 0 : __Pyx_RefNannySetupContext("is_f_contig (wrapper)", 0);
11731 : #if !CYTHON_METH_FASTCALL
11732 : #if CYTHON_ASSUME_SAFE_MACROS
11733 : __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
11734 : #else
11735 : __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
11736 : #endif
11737 : #endif
11738 0 : __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
11739 0 : if (unlikely(__pyx_nargs > 0)) {
11740 0 : __Pyx_RaiseArgtupleInvalid("is_f_contig", 1, 0, 0, __pyx_nargs); return NULL;}
11741 0 : if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "is_f_contig", 0))) return NULL;
11742 0 : __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(((struct __pyx_memoryview_obj *)__pyx_v_self));
11743 :
11744 : /* function exit code */
11745 0 : __Pyx_RefNannyFinishContext();
11746 0 : return __pyx_r;
11747 : }
11748 :
11749 0 : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self) {
11750 0 : __Pyx_memviewslice *__pyx_v_mslice;
11751 0 : __Pyx_memviewslice __pyx_v_tmp;
11752 0 : PyObject *__pyx_r = NULL;
11753 : __Pyx_RefNannyDeclarations
11754 0 : __Pyx_memviewslice *__pyx_t_1;
11755 0 : PyObject *__pyx_t_2 = NULL;
11756 0 : int __pyx_lineno = 0;
11757 0 : const char *__pyx_filename = NULL;
11758 0 : int __pyx_clineno = 0;
11759 0 : __Pyx_RefNannySetupContext("is_f_contig", 1);
11760 :
11761 : /* "View.MemoryView":633
11762 : * cdef __Pyx_memviewslice *mslice
11763 : * cdef __Pyx_memviewslice tmp
11764 : * mslice = get_slice_from_memview(self, &tmp) # <<<<<<<<<<<<<<
11765 : * return slice_is_contig(mslice[0], 'F', self.view.ndim)
11766 : *
11767 : */
11768 0 : __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 633, __pyx_L1_error)
11769 0 : __pyx_v_mslice = __pyx_t_1;
11770 :
11771 : /* "View.MemoryView":634
11772 : * cdef __Pyx_memviewslice tmp
11773 : * mslice = get_slice_from_memview(self, &tmp)
11774 : * return slice_is_contig(mslice[0], 'F', self.view.ndim) # <<<<<<<<<<<<<<
11775 : *
11776 : * def copy(self):
11777 : */
11778 0 : __Pyx_XDECREF(__pyx_r);
11779 0 : __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'F', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 634, __pyx_L1_error)
11780 0 : __Pyx_GOTREF(__pyx_t_2);
11781 0 : __pyx_r = __pyx_t_2;
11782 0 : __pyx_t_2 = 0;
11783 0 : goto __pyx_L0;
11784 :
11785 : /* "View.MemoryView":630
11786 : * return slice_is_contig(mslice[0], 'C', self.view.ndim)
11787 : *
11788 : * def is_f_contig(self): # <<<<<<<<<<<<<<
11789 : * cdef __Pyx_memviewslice *mslice
11790 : * cdef __Pyx_memviewslice tmp
11791 : */
11792 :
11793 : /* function exit code */
11794 0 : __pyx_L1_error:;
11795 0 : __Pyx_XDECREF(__pyx_t_2);
11796 0 : __Pyx_AddTraceback("View.MemoryView.memoryview.is_f_contig", __pyx_clineno, __pyx_lineno, __pyx_filename);
11797 0 : __pyx_r = NULL;
11798 0 : __pyx_L0:;
11799 0 : __Pyx_XGIVEREF(__pyx_r);
11800 0 : __Pyx_RefNannyFinishContext();
11801 0 : return __pyx_r;
11802 : }
11803 :
11804 : /* "View.MemoryView":636
11805 : * return slice_is_contig(mslice[0], 'F', self.view.ndim)
11806 : *
11807 : * def copy(self): # <<<<<<<<<<<<<<
11808 : * cdef __Pyx_memviewslice mslice
11809 : * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
11810 : */
11811 :
11812 : /* Python wrapper */
11813 : static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self,
11814 : #if CYTHON_METH_FASTCALL
11815 : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
11816 : #else
11817 : PyObject *__pyx_args, PyObject *__pyx_kwds
11818 : #endif
11819 : ); /*proto*/
11820 0 : static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self,
11821 : #if CYTHON_METH_FASTCALL
11822 : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
11823 : #else
11824 : PyObject *__pyx_args, PyObject *__pyx_kwds
11825 : #endif
11826 : ) {
11827 : #if !CYTHON_METH_FASTCALL
11828 : CYTHON_UNUSED Py_ssize_t __pyx_nargs;
11829 : #endif
11830 0 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
11831 0 : PyObject *__pyx_r = 0;
11832 : __Pyx_RefNannyDeclarations
11833 0 : __Pyx_RefNannySetupContext("copy (wrapper)", 0);
11834 : #if !CYTHON_METH_FASTCALL
11835 : #if CYTHON_ASSUME_SAFE_MACROS
11836 : __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
11837 : #else
11838 : __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
11839 : #endif
11840 : #endif
11841 0 : __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
11842 0 : if (unlikely(__pyx_nargs > 0)) {
11843 0 : __Pyx_RaiseArgtupleInvalid("copy", 1, 0, 0, __pyx_nargs); return NULL;}
11844 0 : if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "copy", 0))) return NULL;
11845 0 : __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(((struct __pyx_memoryview_obj *)__pyx_v_self));
11846 :
11847 : /* function exit code */
11848 0 : __Pyx_RefNannyFinishContext();
11849 0 : return __pyx_r;
11850 : }
11851 :
11852 0 : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self) {
11853 0 : __Pyx_memviewslice __pyx_v_mslice;
11854 0 : int __pyx_v_flags;
11855 0 : PyObject *__pyx_r = NULL;
11856 : __Pyx_RefNannyDeclarations
11857 0 : __Pyx_memviewslice __pyx_t_1;
11858 0 : PyObject *__pyx_t_2 = NULL;
11859 0 : int __pyx_lineno = 0;
11860 0 : const char *__pyx_filename = NULL;
11861 0 : int __pyx_clineno = 0;
11862 0 : __Pyx_RefNannySetupContext("copy", 1);
11863 :
11864 : /* "View.MemoryView":638
11865 : * def copy(self):
11866 : * cdef __Pyx_memviewslice mslice
11867 : * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS # <<<<<<<<<<<<<<
11868 : *
11869 : * slice_copy(self, &mslice)
11870 : */
11871 0 : __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_F_CONTIGUOUS));
11872 :
11873 : /* "View.MemoryView":640
11874 : * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
11875 : *
11876 : * slice_copy(self, &mslice) # <<<<<<<<<<<<<<
11877 : * mslice = slice_copy_contig(&mslice, "c", self.view.ndim,
11878 : * self.view.itemsize,
11879 : */
11880 0 : __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_mslice));
11881 :
11882 : /* "View.MemoryView":641
11883 : *
11884 : * slice_copy(self, &mslice)
11885 : * mslice = slice_copy_contig(&mslice, "c", self.view.ndim, # <<<<<<<<<<<<<<
11886 : * self.view.itemsize,
11887 : * flags|PyBUF_C_CONTIGUOUS,
11888 : */
11889 0 : __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_mslice), ((char *)"c"), __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_C_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 641, __pyx_L1_error)
11890 0 : __pyx_v_mslice = __pyx_t_1;
11891 :
11892 : /* "View.MemoryView":646
11893 : * self.dtype_is_object)
11894 : *
11895 : * return memoryview_copy_from_slice(self, &mslice) # <<<<<<<<<<<<<<
11896 : *
11897 : * def copy_fortran(self):
11898 : */
11899 0 : __Pyx_XDECREF(__pyx_r);
11900 0 : __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_mslice)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 646, __pyx_L1_error)
11901 0 : __Pyx_GOTREF(__pyx_t_2);
11902 0 : __pyx_r = __pyx_t_2;
11903 0 : __pyx_t_2 = 0;
11904 0 : goto __pyx_L0;
11905 :
11906 : /* "View.MemoryView":636
11907 : * return slice_is_contig(mslice[0], 'F', self.view.ndim)
11908 : *
11909 : * def copy(self): # <<<<<<<<<<<<<<
11910 : * cdef __Pyx_memviewslice mslice
11911 : * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
11912 : */
11913 :
11914 : /* function exit code */
11915 0 : __pyx_L1_error:;
11916 0 : __Pyx_XDECREF(__pyx_t_2);
11917 0 : __Pyx_AddTraceback("View.MemoryView.memoryview.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
11918 0 : __pyx_r = NULL;
11919 0 : __pyx_L0:;
11920 0 : __Pyx_XGIVEREF(__pyx_r);
11921 0 : __Pyx_RefNannyFinishContext();
11922 0 : return __pyx_r;
11923 : }
11924 :
11925 : /* "View.MemoryView":648
11926 : * return memoryview_copy_from_slice(self, &mslice)
11927 : *
11928 : * def copy_fortran(self): # <<<<<<<<<<<<<<
11929 : * cdef __Pyx_memviewslice src, dst
11930 : * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
11931 : */
11932 :
11933 : /* Python wrapper */
11934 : static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self,
11935 : #if CYTHON_METH_FASTCALL
11936 : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
11937 : #else
11938 : PyObject *__pyx_args, PyObject *__pyx_kwds
11939 : #endif
11940 : ); /*proto*/
11941 0 : static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self,
11942 : #if CYTHON_METH_FASTCALL
11943 : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
11944 : #else
11945 : PyObject *__pyx_args, PyObject *__pyx_kwds
11946 : #endif
11947 : ) {
11948 : #if !CYTHON_METH_FASTCALL
11949 : CYTHON_UNUSED Py_ssize_t __pyx_nargs;
11950 : #endif
11951 0 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
11952 0 : PyObject *__pyx_r = 0;
11953 : __Pyx_RefNannyDeclarations
11954 0 : __Pyx_RefNannySetupContext("copy_fortran (wrapper)", 0);
11955 : #if !CYTHON_METH_FASTCALL
11956 : #if CYTHON_ASSUME_SAFE_MACROS
11957 : __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
11958 : #else
11959 : __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
11960 : #endif
11961 : #endif
11962 0 : __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
11963 0 : if (unlikely(__pyx_nargs > 0)) {
11964 0 : __Pyx_RaiseArgtupleInvalid("copy_fortran", 1, 0, 0, __pyx_nargs); return NULL;}
11965 0 : if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "copy_fortran", 0))) return NULL;
11966 0 : __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(((struct __pyx_memoryview_obj *)__pyx_v_self));
11967 :
11968 : /* function exit code */
11969 0 : __Pyx_RefNannyFinishContext();
11970 0 : return __pyx_r;
11971 : }
11972 :
11973 0 : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self) {
11974 0 : __Pyx_memviewslice __pyx_v_src;
11975 0 : __Pyx_memviewslice __pyx_v_dst;
11976 0 : int __pyx_v_flags;
11977 0 : PyObject *__pyx_r = NULL;
11978 : __Pyx_RefNannyDeclarations
11979 0 : __Pyx_memviewslice __pyx_t_1;
11980 0 : PyObject *__pyx_t_2 = NULL;
11981 0 : int __pyx_lineno = 0;
11982 0 : const char *__pyx_filename = NULL;
11983 0 : int __pyx_clineno = 0;
11984 0 : __Pyx_RefNannySetupContext("copy_fortran", 1);
11985 :
11986 : /* "View.MemoryView":650
11987 : * def copy_fortran(self):
11988 : * cdef __Pyx_memviewslice src, dst
11989 : * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS # <<<<<<<<<<<<<<
11990 : *
11991 : * slice_copy(self, &src)
11992 : */
11993 0 : __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_C_CONTIGUOUS));
11994 :
11995 : /* "View.MemoryView":652
11996 : * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
11997 : *
11998 : * slice_copy(self, &src) # <<<<<<<<<<<<<<
11999 : * dst = slice_copy_contig(&src, "fortran", self.view.ndim,
12000 : * self.view.itemsize,
12001 : */
12002 0 : __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_src));
12003 :
12004 : /* "View.MemoryView":653
12005 : *
12006 : * slice_copy(self, &src)
12007 : * dst = slice_copy_contig(&src, "fortran", self.view.ndim, # <<<<<<<<<<<<<<
12008 : * self.view.itemsize,
12009 : * flags|PyBUF_F_CONTIGUOUS,
12010 : */
12011 0 : __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_src), ((char *)"fortran"), __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_F_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 653, __pyx_L1_error)
12012 0 : __pyx_v_dst = __pyx_t_1;
12013 :
12014 : /* "View.MemoryView":658
12015 : * self.dtype_is_object)
12016 : *
12017 : * return memoryview_copy_from_slice(self, &dst) # <<<<<<<<<<<<<<
12018 : *
12019 : *
12020 : */
12021 0 : __Pyx_XDECREF(__pyx_r);
12022 0 : __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_dst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 658, __pyx_L1_error)
12023 0 : __Pyx_GOTREF(__pyx_t_2);
12024 0 : __pyx_r = __pyx_t_2;
12025 0 : __pyx_t_2 = 0;
12026 0 : goto __pyx_L0;
12027 :
12028 : /* "View.MemoryView":648
12029 : * return memoryview_copy_from_slice(self, &mslice)
12030 : *
12031 : * def copy_fortran(self): # <<<<<<<<<<<<<<
12032 : * cdef __Pyx_memviewslice src, dst
12033 : * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
12034 : */
12035 :
12036 : /* function exit code */
12037 0 : __pyx_L1_error:;
12038 0 : __Pyx_XDECREF(__pyx_t_2);
12039 0 : __Pyx_AddTraceback("View.MemoryView.memoryview.copy_fortran", __pyx_clineno, __pyx_lineno, __pyx_filename);
12040 0 : __pyx_r = NULL;
12041 0 : __pyx_L0:;
12042 0 : __Pyx_XGIVEREF(__pyx_r);
12043 0 : __Pyx_RefNannyFinishContext();
12044 0 : return __pyx_r;
12045 : }
12046 :
12047 : /* "(tree fragment)":1
12048 : * def __reduce_cython__(self): # <<<<<<<<<<<<<<
12049 : * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
12050 : * def __setstate_cython__(self, __pyx_state):
12051 : */
12052 :
12053 : /* Python wrapper */
12054 : static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self,
12055 : #if CYTHON_METH_FASTCALL
12056 : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
12057 : #else
12058 : PyObject *__pyx_args, PyObject *__pyx_kwds
12059 : #endif
12060 : ); /*proto*/
12061 0 : static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self,
12062 : #if CYTHON_METH_FASTCALL
12063 : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
12064 : #else
12065 : PyObject *__pyx_args, PyObject *__pyx_kwds
12066 : #endif
12067 : ) {
12068 : #if !CYTHON_METH_FASTCALL
12069 : CYTHON_UNUSED Py_ssize_t __pyx_nargs;
12070 : #endif
12071 0 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
12072 0 : PyObject *__pyx_r = 0;
12073 : __Pyx_RefNannyDeclarations
12074 0 : __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
12075 : #if !CYTHON_METH_FASTCALL
12076 : #if CYTHON_ASSUME_SAFE_MACROS
12077 : __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
12078 : #else
12079 : __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
12080 : #endif
12081 : #endif
12082 0 : __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
12083 0 : if (unlikely(__pyx_nargs > 0)) {
12084 0 : __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
12085 0 : if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
12086 0 : __pyx_r = __pyx_pf___pyx_memoryview___reduce_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self));
12087 :
12088 : /* function exit code */
12089 0 : __Pyx_RefNannyFinishContext();
12090 0 : return __pyx_r;
12091 : }
12092 :
12093 0 : static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self) {
12094 0 : PyObject *__pyx_r = NULL;
12095 : __Pyx_RefNannyDeclarations
12096 0 : int __pyx_lineno = 0;
12097 0 : const char *__pyx_filename = NULL;
12098 0 : int __pyx_clineno = 0;
12099 0 : __Pyx_RefNannySetupContext("__reduce_cython__", 1);
12100 :
12101 : /* "(tree fragment)":2
12102 : * def __reduce_cython__(self):
12103 : * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<<
12104 : * def __setstate_cython__(self, __pyx_state):
12105 : * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
12106 : */
12107 0 : __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
12108 0 : __PYX_ERR(1, 2, __pyx_L1_error)
12109 :
12110 : /* "(tree fragment)":1
12111 : * def __reduce_cython__(self): # <<<<<<<<<<<<<<
12112 : * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
12113 : * def __setstate_cython__(self, __pyx_state):
12114 : */
12115 :
12116 : /* function exit code */
12117 0 : __pyx_L1_error:;
12118 0 : __Pyx_AddTraceback("View.MemoryView.memoryview.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12119 0 : __pyx_r = NULL;
12120 0 : __Pyx_XGIVEREF(__pyx_r);
12121 0 : __Pyx_RefNannyFinishContext();
12122 0 : return __pyx_r;
12123 : }
12124 :
12125 : /* "(tree fragment)":3
12126 : * def __reduce_cython__(self):
12127 : * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
12128 : * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
12129 : * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
12130 : */
12131 :
12132 : /* Python wrapper */
12133 : static PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self,
12134 : #if CYTHON_METH_FASTCALL
12135 : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
12136 : #else
12137 : PyObject *__pyx_args, PyObject *__pyx_kwds
12138 : #endif
12139 : ); /*proto*/
12140 0 : static PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self,
12141 : #if CYTHON_METH_FASTCALL
12142 : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
12143 : #else
12144 : PyObject *__pyx_args, PyObject *__pyx_kwds
12145 : #endif
12146 : ) {
12147 0 : CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
12148 : #if !CYTHON_METH_FASTCALL
12149 : CYTHON_UNUSED Py_ssize_t __pyx_nargs;
12150 : #endif
12151 0 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
12152 0 : PyObject* values[1] = {0};
12153 0 : int __pyx_lineno = 0;
12154 0 : const char *__pyx_filename = NULL;
12155 0 : int __pyx_clineno = 0;
12156 0 : PyObject *__pyx_r = 0;
12157 : __Pyx_RefNannyDeclarations
12158 0 : __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
12159 : #if !CYTHON_METH_FASTCALL
12160 : #if CYTHON_ASSUME_SAFE_MACROS
12161 : __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
12162 : #else
12163 : __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
12164 : #endif
12165 : #endif
12166 0 : __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
12167 : {
12168 0 : PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
12169 0 : if (__pyx_kwds) {
12170 0 : Py_ssize_t kw_args;
12171 0 : switch (__pyx_nargs) {
12172 0 : case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
12173 0 : CYTHON_FALLTHROUGH;
12174 0 : case 0: break;
12175 0 : default: goto __pyx_L5_argtuple_error;
12176 : }
12177 0 : kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
12178 0 : switch (__pyx_nargs) {
12179 : case 0:
12180 0 : if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
12181 0 : (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
12182 0 : kw_args--;
12183 : }
12184 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
12185 0 : else goto __pyx_L5_argtuple_error;
12186 : }
12187 0 : if (unlikely(kw_args > 0)) {
12188 0 : const Py_ssize_t kwd_pos_args = __pyx_nargs;
12189 0 : if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
12190 : }
12191 0 : } else if (unlikely(__pyx_nargs != 1)) {
12192 0 : goto __pyx_L5_argtuple_error;
12193 : } else {
12194 0 : values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
12195 : }
12196 0 : __pyx_v___pyx_state = values[0];
12197 : }
12198 0 : goto __pyx_L6_skip;
12199 0 : __pyx_L5_argtuple_error:;
12200 0 : __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
12201 0 : __pyx_L6_skip:;
12202 0 : goto __pyx_L4_argument_unpacking_done;
12203 0 : __pyx_L3_error:;
12204 : {
12205 0 : Py_ssize_t __pyx_temp;
12206 0 : for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
12207 : __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
12208 : }
12209 : }
12210 0 : __Pyx_AddTraceback("View.MemoryView.memoryview.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12211 0 : __Pyx_RefNannyFinishContext();
12212 0 : return NULL;
12213 0 : __pyx_L4_argument_unpacking_done:;
12214 0 : __pyx_r = __pyx_pf___pyx_memoryview_2__setstate_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v___pyx_state);
12215 :
12216 : /* function exit code */
12217 : {
12218 0 : Py_ssize_t __pyx_temp;
12219 0 : for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
12220 : __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
12221 : }
12222 : }
12223 : __Pyx_RefNannyFinishContext();
12224 : return __pyx_r;
12225 : }
12226 :
12227 0 : static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
12228 0 : PyObject *__pyx_r = NULL;
12229 : __Pyx_RefNannyDeclarations
12230 0 : int __pyx_lineno = 0;
12231 0 : const char *__pyx_filename = NULL;
12232 0 : int __pyx_clineno = 0;
12233 0 : __Pyx_RefNannySetupContext("__setstate_cython__", 1);
12234 :
12235 : /* "(tree fragment)":4
12236 : * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
12237 : * def __setstate_cython__(self, __pyx_state):
12238 : * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<<
12239 : */
12240 0 : __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
12241 0 : __PYX_ERR(1, 4, __pyx_L1_error)
12242 :
12243 : /* "(tree fragment)":3
12244 : * def __reduce_cython__(self):
12245 : * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
12246 : * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
12247 : * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
12248 : */
12249 :
12250 : /* function exit code */
12251 0 : __pyx_L1_error:;
12252 0 : __Pyx_AddTraceback("View.MemoryView.memoryview.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12253 0 : __pyx_r = NULL;
12254 0 : __Pyx_XGIVEREF(__pyx_r);
12255 0 : __Pyx_RefNannyFinishContext();
12256 0 : return __pyx_r;
12257 : }
12258 :
12259 : /* "View.MemoryView":662
12260 : *
12261 : * @cname('__pyx_memoryview_new')
12262 : * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo): # <<<<<<<<<<<<<<
12263 : * cdef memoryview result = memoryview(o, flags, dtype_is_object)
12264 : * result.typeinfo = typeinfo
12265 : */
12266 :
12267 3057 : static PyObject *__pyx_memoryview_new(PyObject *__pyx_v_o, int __pyx_v_flags, int __pyx_v_dtype_is_object, __Pyx_TypeInfo *__pyx_v_typeinfo) {
12268 3057 : struct __pyx_memoryview_obj *__pyx_v_result = 0;
12269 3057 : PyObject *__pyx_r = NULL;
12270 : __Pyx_RefNannyDeclarations
12271 3057 : PyObject *__pyx_t_1 = NULL;
12272 3057 : PyObject *__pyx_t_2 = NULL;
12273 3057 : PyObject *__pyx_t_3 = NULL;
12274 3057 : int __pyx_lineno = 0;
12275 3057 : const char *__pyx_filename = NULL;
12276 3057 : int __pyx_clineno = 0;
12277 3057 : __Pyx_RefNannySetupContext("memoryview_cwrapper", 1);
12278 :
12279 : /* "View.MemoryView":663
12280 : * @cname('__pyx_memoryview_new')
12281 : * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):
12282 : * cdef memoryview result = memoryview(o, flags, dtype_is_object) # <<<<<<<<<<<<<<
12283 : * result.typeinfo = typeinfo
12284 : * return result
12285 : */
12286 3057 : __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 663, __pyx_L1_error)
12287 3057 : __Pyx_GOTREF(__pyx_t_1);
12288 3057 : __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 663, __pyx_L1_error)
12289 3057 : __Pyx_GOTREF(__pyx_t_2);
12290 3057 : __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 663, __pyx_L1_error)
12291 3057 : __Pyx_GOTREF(__pyx_t_3);
12292 3057 : __Pyx_INCREF(__pyx_v_o);
12293 3057 : __Pyx_GIVEREF(__pyx_v_o);
12294 3057 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_o)) __PYX_ERR(1, 663, __pyx_L1_error);
12295 3057 : __Pyx_GIVEREF(__pyx_t_1);
12296 3057 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(1, 663, __pyx_L1_error);
12297 3057 : __Pyx_GIVEREF(__pyx_t_2);
12298 3057 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2)) __PYX_ERR(1, 663, __pyx_L1_error);
12299 3057 : __pyx_t_1 = 0;
12300 3057 : __pyx_t_2 = 0;
12301 3057 : __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 663, __pyx_L1_error)
12302 3057 : __Pyx_GOTREF(__pyx_t_2);
12303 3057 : __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12304 3057 : __pyx_v_result = ((struct __pyx_memoryview_obj *)__pyx_t_2);
12305 3057 : __pyx_t_2 = 0;
12306 :
12307 : /* "View.MemoryView":664
12308 : * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):
12309 : * cdef memoryview result = memoryview(o, flags, dtype_is_object)
12310 : * result.typeinfo = typeinfo # <<<<<<<<<<<<<<
12311 : * return result
12312 : *
12313 : */
12314 3057 : __pyx_v_result->typeinfo = __pyx_v_typeinfo;
12315 :
12316 : /* "View.MemoryView":665
12317 : * cdef memoryview result = memoryview(o, flags, dtype_is_object)
12318 : * result.typeinfo = typeinfo
12319 : * return result # <<<<<<<<<<<<<<
12320 : *
12321 : * @cname('__pyx_memoryview_check')
12322 : */
12323 3057 : __Pyx_XDECREF(__pyx_r);
12324 3057 : __Pyx_INCREF((PyObject *)__pyx_v_result);
12325 3057 : __pyx_r = ((PyObject *)__pyx_v_result);
12326 3057 : goto __pyx_L0;
12327 :
12328 : /* "View.MemoryView":662
12329 : *
12330 : * @cname('__pyx_memoryview_new')
12331 : * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo): # <<<<<<<<<<<<<<
12332 : * cdef memoryview result = memoryview(o, flags, dtype_is_object)
12333 : * result.typeinfo = typeinfo
12334 : */
12335 :
12336 : /* function exit code */
12337 0 : __pyx_L1_error:;
12338 0 : __Pyx_XDECREF(__pyx_t_1);
12339 0 : __Pyx_XDECREF(__pyx_t_2);
12340 0 : __Pyx_XDECREF(__pyx_t_3);
12341 0 : __Pyx_AddTraceback("View.MemoryView.memoryview_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
12342 0 : __pyx_r = 0;
12343 3057 : __pyx_L0:;
12344 3057 : __Pyx_XDECREF((PyObject *)__pyx_v_result);
12345 3057 : __Pyx_XGIVEREF(__pyx_r);
12346 3057 : __Pyx_RefNannyFinishContext();
12347 3057 : return __pyx_r;
12348 : }
12349 :
12350 : /* "View.MemoryView":668
12351 : *
12352 : * @cname('__pyx_memoryview_check')
12353 : * cdef inline bint memoryview_check(object o) noexcept: # <<<<<<<<<<<<<<
12354 : * return isinstance(o, memoryview)
12355 : *
12356 : */
12357 :
12358 3057 : static CYTHON_INLINE int __pyx_memoryview_check(PyObject *__pyx_v_o) {
12359 3057 : int __pyx_r;
12360 3057 : int __pyx_t_1;
12361 :
12362 : /* "View.MemoryView":669
12363 : * @cname('__pyx_memoryview_check')
12364 : * cdef inline bint memoryview_check(object o) noexcept:
12365 : * return isinstance(o, memoryview) # <<<<<<<<<<<<<<
12366 : *
12367 : * cdef tuple _unellipsify(object index, int ndim):
12368 : */
12369 3057 : __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_o, __pyx_memoryview_type);
12370 3057 : __pyx_r = __pyx_t_1;
12371 3057 : goto __pyx_L0;
12372 :
12373 : /* "View.MemoryView":668
12374 : *
12375 : * @cname('__pyx_memoryview_check')
12376 : * cdef inline bint memoryview_check(object o) noexcept: # <<<<<<<<<<<<<<
12377 : * return isinstance(o, memoryview)
12378 : *
12379 : */
12380 :
12381 : /* function exit code */
12382 3057 : __pyx_L0:;
12383 3057 : return __pyx_r;
12384 : }
12385 :
12386 : /* "View.MemoryView":671
12387 : * return isinstance(o, memoryview)
12388 : *
12389 : * cdef tuple _unellipsify(object index, int ndim): # <<<<<<<<<<<<<<
12390 : * """
12391 : * Replace all ellipses with full slices and fill incomplete indices with
12392 : */
12393 :
12394 0 : static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) {
12395 0 : Py_ssize_t __pyx_v_idx;
12396 0 : PyObject *__pyx_v_tup = NULL;
12397 0 : PyObject *__pyx_v_result = NULL;
12398 0 : int __pyx_v_have_slices;
12399 0 : int __pyx_v_seen_ellipsis;
12400 0 : PyObject *__pyx_v_item = NULL;
12401 0 : Py_ssize_t __pyx_v_nslices;
12402 0 : PyObject *__pyx_r = NULL;
12403 : __Pyx_RefNannyDeclarations
12404 0 : PyObject *__pyx_t_1 = NULL;
12405 0 : int __pyx_t_2;
12406 0 : PyObject *__pyx_t_3 = NULL;
12407 0 : Py_ssize_t __pyx_t_4;
12408 0 : Py_ssize_t __pyx_t_5;
12409 0 : Py_UCS4 __pyx_t_6;
12410 0 : PyObject *__pyx_t_7 = NULL;
12411 0 : int __pyx_lineno = 0;
12412 0 : const char *__pyx_filename = NULL;
12413 0 : int __pyx_clineno = 0;
12414 0 : __Pyx_RefNannySetupContext("_unellipsify", 1);
12415 :
12416 : /* "View.MemoryView":677
12417 : * """
12418 : * cdef Py_ssize_t idx
12419 : * tup = <tuple>index if isinstance(index, tuple) else (index,) # <<<<<<<<<<<<<<
12420 : *
12421 : * result = [slice(None)] * ndim
12422 : */
12423 0 : __pyx_t_2 = PyTuple_Check(__pyx_v_index);
12424 0 : if (__pyx_t_2) {
12425 0 : __Pyx_INCREF(((PyObject*)__pyx_v_index));
12426 : __pyx_t_1 = __pyx_v_index;
12427 : } else {
12428 0 : __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 677, __pyx_L1_error)
12429 0 : __Pyx_GOTREF(__pyx_t_3);
12430 0 : __Pyx_INCREF(__pyx_v_index);
12431 0 : __Pyx_GIVEREF(__pyx_v_index);
12432 0 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_index)) __PYX_ERR(1, 677, __pyx_L1_error);
12433 0 : __pyx_t_1 = __pyx_t_3;
12434 0 : __pyx_t_3 = 0;
12435 : }
12436 0 : __pyx_v_tup = ((PyObject*)__pyx_t_1);
12437 0 : __pyx_t_1 = 0;
12438 :
12439 : /* "View.MemoryView":679
12440 : * tup = <tuple>index if isinstance(index, tuple) else (index,)
12441 : *
12442 : * result = [slice(None)] * ndim # <<<<<<<<<<<<<<
12443 : * have_slices = False
12444 : * seen_ellipsis = False
12445 : */
12446 0 : __pyx_t_1 = PyList_New(1 * ((__pyx_v_ndim<0) ? 0:__pyx_v_ndim)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 679, __pyx_L1_error)
12447 : __Pyx_GOTREF(__pyx_t_1);
12448 : { Py_ssize_t __pyx_temp;
12449 0 : for (__pyx_temp=0; __pyx_temp < __pyx_v_ndim; __pyx_temp++) {
12450 0 : __Pyx_INCREF(__pyx_slice__5);
12451 0 : __Pyx_GIVEREF(__pyx_slice__5);
12452 0 : if (__Pyx_PyList_SET_ITEM(__pyx_t_1, __pyx_temp, __pyx_slice__5)) __PYX_ERR(1, 679, __pyx_L1_error);
12453 : }
12454 : }
12455 0 : __pyx_v_result = ((PyObject*)__pyx_t_1);
12456 0 : __pyx_t_1 = 0;
12457 :
12458 : /* "View.MemoryView":680
12459 : *
12460 : * result = [slice(None)] * ndim
12461 : * have_slices = False # <<<<<<<<<<<<<<
12462 : * seen_ellipsis = False
12463 : * idx = 0
12464 : */
12465 0 : __pyx_v_have_slices = 0;
12466 :
12467 : /* "View.MemoryView":681
12468 : * result = [slice(None)] * ndim
12469 : * have_slices = False
12470 : * seen_ellipsis = False # <<<<<<<<<<<<<<
12471 : * idx = 0
12472 : * for item in tup:
12473 : */
12474 0 : __pyx_v_seen_ellipsis = 0;
12475 :
12476 : /* "View.MemoryView":682
12477 : * have_slices = False
12478 : * seen_ellipsis = False
12479 : * idx = 0 # <<<<<<<<<<<<<<
12480 : * for item in tup:
12481 : * if item is Ellipsis:
12482 : */
12483 0 : __pyx_v_idx = 0;
12484 :
12485 : /* "View.MemoryView":683
12486 : * seen_ellipsis = False
12487 : * idx = 0
12488 : * for item in tup: # <<<<<<<<<<<<<<
12489 : * if item is Ellipsis:
12490 : * if not seen_ellipsis:
12491 : */
12492 0 : if (unlikely(__pyx_v_tup == Py_None)) {
12493 0 : PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
12494 0 : __PYX_ERR(1, 683, __pyx_L1_error)
12495 : }
12496 0 : __pyx_t_1 = __pyx_v_tup; __Pyx_INCREF(__pyx_t_1);
12497 : __pyx_t_4 = 0;
12498 0 : for (;;) {
12499 0 : {
12500 0 : Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
12501 : #if !CYTHON_ASSUME_SAFE_MACROS
12502 : if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 683, __pyx_L1_error)
12503 : #endif
12504 0 : if (__pyx_t_4 >= __pyx_temp) break;
12505 : }
12506 : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12507 0 : __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(1, 683, __pyx_L1_error)
12508 : #else
12509 : __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 683, __pyx_L1_error)
12510 : __Pyx_GOTREF(__pyx_t_3);
12511 : #endif
12512 0 : __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_3);
12513 0 : __pyx_t_3 = 0;
12514 :
12515 : /* "View.MemoryView":684
12516 : * idx = 0
12517 : * for item in tup:
12518 : * if item is Ellipsis: # <<<<<<<<<<<<<<
12519 : * if not seen_ellipsis:
12520 : * idx += ndim - len(tup)
12521 : */
12522 0 : __pyx_t_2 = (__pyx_v_item == __pyx_builtin_Ellipsis);
12523 0 : if (__pyx_t_2) {
12524 :
12525 : /* "View.MemoryView":685
12526 : * for item in tup:
12527 : * if item is Ellipsis:
12528 : * if not seen_ellipsis: # <<<<<<<<<<<<<<
12529 : * idx += ndim - len(tup)
12530 : * seen_ellipsis = True
12531 : */
12532 0 : __pyx_t_2 = (!__pyx_v_seen_ellipsis);
12533 0 : if (__pyx_t_2) {
12534 :
12535 : /* "View.MemoryView":686
12536 : * if item is Ellipsis:
12537 : * if not seen_ellipsis:
12538 : * idx += ndim - len(tup) # <<<<<<<<<<<<<<
12539 : * seen_ellipsis = True
12540 : * have_slices = True
12541 : */
12542 0 : if (unlikely(__pyx_v_tup == Py_None)) {
12543 : PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
12544 : __PYX_ERR(1, 686, __pyx_L1_error)
12545 : }
12546 0 : __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(__pyx_v_tup); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 686, __pyx_L1_error)
12547 0 : __pyx_v_idx = (__pyx_v_idx + (__pyx_v_ndim - __pyx_t_5));
12548 :
12549 : /* "View.MemoryView":687
12550 : * if not seen_ellipsis:
12551 : * idx += ndim - len(tup)
12552 : * seen_ellipsis = True # <<<<<<<<<<<<<<
12553 : * have_slices = True
12554 : * else:
12555 : */
12556 0 : __pyx_v_seen_ellipsis = 1;
12557 :
12558 : /* "View.MemoryView":685
12559 : * for item in tup:
12560 : * if item is Ellipsis:
12561 : * if not seen_ellipsis: # <<<<<<<<<<<<<<
12562 : * idx += ndim - len(tup)
12563 : * seen_ellipsis = True
12564 : */
12565 : }
12566 :
12567 : /* "View.MemoryView":688
12568 : * idx += ndim - len(tup)
12569 : * seen_ellipsis = True
12570 : * have_slices = True # <<<<<<<<<<<<<<
12571 : * else:
12572 : * if isinstance(item, slice):
12573 : */
12574 0 : __pyx_v_have_slices = 1;
12575 :
12576 : /* "View.MemoryView":684
12577 : * idx = 0
12578 : * for item in tup:
12579 : * if item is Ellipsis: # <<<<<<<<<<<<<<
12580 : * if not seen_ellipsis:
12581 : * idx += ndim - len(tup)
12582 : */
12583 0 : goto __pyx_L5;
12584 : }
12585 :
12586 : /* "View.MemoryView":690
12587 : * have_slices = True
12588 : * else:
12589 : * if isinstance(item, slice): # <<<<<<<<<<<<<<
12590 : * have_slices = True
12591 : * elif not PyIndex_Check(item):
12592 : */
12593 : /*else*/ {
12594 0 : __pyx_t_2 = PySlice_Check(__pyx_v_item);
12595 0 : if (__pyx_t_2) {
12596 :
12597 : /* "View.MemoryView":691
12598 : * else:
12599 : * if isinstance(item, slice):
12600 : * have_slices = True # <<<<<<<<<<<<<<
12601 : * elif not PyIndex_Check(item):
12602 : * raise TypeError, f"Cannot index with type '{type(item)}'"
12603 : */
12604 0 : __pyx_v_have_slices = 1;
12605 :
12606 : /* "View.MemoryView":690
12607 : * have_slices = True
12608 : * else:
12609 : * if isinstance(item, slice): # <<<<<<<<<<<<<<
12610 : * have_slices = True
12611 : * elif not PyIndex_Check(item):
12612 : */
12613 0 : goto __pyx_L7;
12614 : }
12615 :
12616 : /* "View.MemoryView":692
12617 : * if isinstance(item, slice):
12618 : * have_slices = True
12619 : * elif not PyIndex_Check(item): # <<<<<<<<<<<<<<
12620 : * raise TypeError, f"Cannot index with type '{type(item)}'"
12621 : * result[idx] = item
12622 : */
12623 0 : __pyx_t_2 = (!(PyIndex_Check(__pyx_v_item) != 0));
12624 0 : if (unlikely(__pyx_t_2)) {
12625 :
12626 : /* "View.MemoryView":693
12627 : * have_slices = True
12628 : * elif not PyIndex_Check(item):
12629 : * raise TypeError, f"Cannot index with type '{type(item)}'" # <<<<<<<<<<<<<<
12630 : * result[idx] = item
12631 : * idx += 1
12632 : */
12633 0 : __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 693, __pyx_L1_error)
12634 0 : __Pyx_GOTREF(__pyx_t_3);
12635 0 : __pyx_t_5 = 0;
12636 0 : __pyx_t_6 = 127;
12637 0 : __Pyx_INCREF(__pyx_kp_u_Cannot_index_with_type);
12638 0 : __pyx_t_5 += 24;
12639 0 : __Pyx_GIVEREF(__pyx_kp_u_Cannot_index_with_type);
12640 0 : PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Cannot_index_with_type);
12641 0 : __pyx_t_7 = __Pyx_PyObject_FormatSimple(((PyObject *)Py_TYPE(__pyx_v_item)), __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 693, __pyx_L1_error)
12642 0 : __Pyx_GOTREF(__pyx_t_7);
12643 0 : __pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_6;
12644 0 : __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7);
12645 0 : __Pyx_GIVEREF(__pyx_t_7);
12646 0 : PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_7);
12647 0 : __pyx_t_7 = 0;
12648 0 : __Pyx_INCREF(__pyx_kp_u__6);
12649 0 : __pyx_t_5 += 1;
12650 0 : __Pyx_GIVEREF(__pyx_kp_u__6);
12651 0 : PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u__6);
12652 0 : __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 693, __pyx_L1_error)
12653 0 : __Pyx_GOTREF(__pyx_t_7);
12654 0 : __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12655 0 : __Pyx_Raise(__pyx_builtin_TypeError, __pyx_t_7, 0, 0);
12656 0 : __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12657 0 : __PYX_ERR(1, 693, __pyx_L1_error)
12658 :
12659 : /* "View.MemoryView":692
12660 : * if isinstance(item, slice):
12661 : * have_slices = True
12662 : * elif not PyIndex_Check(item): # <<<<<<<<<<<<<<
12663 : * raise TypeError, f"Cannot index with type '{type(item)}'"
12664 : * result[idx] = item
12665 : */
12666 : }
12667 0 : __pyx_L7:;
12668 :
12669 : /* "View.MemoryView":694
12670 : * elif not PyIndex_Check(item):
12671 : * raise TypeError, f"Cannot index with type '{type(item)}'"
12672 : * result[idx] = item # <<<<<<<<<<<<<<
12673 : * idx += 1
12674 : *
12675 : */
12676 0 : if (unlikely((__Pyx_SetItemInt(__pyx_v_result, __pyx_v_idx, __pyx_v_item, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1) < 0))) __PYX_ERR(1, 694, __pyx_L1_error)
12677 : }
12678 0 : __pyx_L5:;
12679 :
12680 : /* "View.MemoryView":695
12681 : * raise TypeError, f"Cannot index with type '{type(item)}'"
12682 : * result[idx] = item
12683 : * idx += 1 # <<<<<<<<<<<<<<
12684 : *
12685 : * nslices = ndim - idx
12686 : */
12687 0 : __pyx_v_idx = (__pyx_v_idx + 1);
12688 :
12689 : /* "View.MemoryView":683
12690 : * seen_ellipsis = False
12691 : * idx = 0
12692 : * for item in tup: # <<<<<<<<<<<<<<
12693 : * if item is Ellipsis:
12694 : * if not seen_ellipsis:
12695 : */
12696 : }
12697 0 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12698 :
12699 : /* "View.MemoryView":697
12700 : * idx += 1
12701 : *
12702 : * nslices = ndim - idx # <<<<<<<<<<<<<<
12703 : * return have_slices or nslices, tuple(result)
12704 : *
12705 : */
12706 0 : __pyx_v_nslices = (__pyx_v_ndim - __pyx_v_idx);
12707 :
12708 : /* "View.MemoryView":698
12709 : *
12710 : * nslices = ndim - idx
12711 : * return have_slices or nslices, tuple(result) # <<<<<<<<<<<<<<
12712 : *
12713 : * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1:
12714 : */
12715 0 : __Pyx_XDECREF(__pyx_r);
12716 0 : if (!__pyx_v_have_slices) {
12717 0 : } else {
12718 0 : __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_have_slices); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 698, __pyx_L1_error)
12719 0 : __Pyx_GOTREF(__pyx_t_7);
12720 0 : __pyx_t_1 = __pyx_t_7;
12721 0 : __pyx_t_7 = 0;
12722 0 : goto __pyx_L9_bool_binop_done;
12723 : }
12724 0 : __pyx_t_7 = PyInt_FromSsize_t(__pyx_v_nslices); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 698, __pyx_L1_error)
12725 : __Pyx_GOTREF(__pyx_t_7);
12726 : __pyx_t_1 = __pyx_t_7;
12727 0 : __pyx_t_7 = 0;
12728 0 : __pyx_L9_bool_binop_done:;
12729 0 : __pyx_t_7 = PyList_AsTuple(__pyx_v_result); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 698, __pyx_L1_error)
12730 0 : __Pyx_GOTREF(__pyx_t_7);
12731 0 : __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 698, __pyx_L1_error)
12732 0 : __Pyx_GOTREF(__pyx_t_3);
12733 0 : __Pyx_GIVEREF(__pyx_t_1);
12734 0 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(1, 698, __pyx_L1_error);
12735 0 : __Pyx_GIVEREF(__pyx_t_7);
12736 0 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_7)) __PYX_ERR(1, 698, __pyx_L1_error);
12737 0 : __pyx_t_1 = 0;
12738 0 : __pyx_t_7 = 0;
12739 0 : __pyx_r = ((PyObject*)__pyx_t_3);
12740 0 : __pyx_t_3 = 0;
12741 0 : goto __pyx_L0;
12742 :
12743 : /* "View.MemoryView":671
12744 : * return isinstance(o, memoryview)
12745 : *
12746 : * cdef tuple _unellipsify(object index, int ndim): # <<<<<<<<<<<<<<
12747 : * """
12748 : * Replace all ellipses with full slices and fill incomplete indices with
12749 : */
12750 :
12751 : /* function exit code */
12752 0 : __pyx_L1_error:;
12753 0 : __Pyx_XDECREF(__pyx_t_1);
12754 0 : __Pyx_XDECREF(__pyx_t_3);
12755 0 : __Pyx_XDECREF(__pyx_t_7);
12756 0 : __Pyx_AddTraceback("View.MemoryView._unellipsify", __pyx_clineno, __pyx_lineno, __pyx_filename);
12757 0 : __pyx_r = 0;
12758 0 : __pyx_L0:;
12759 0 : __Pyx_XDECREF(__pyx_v_tup);
12760 0 : __Pyx_XDECREF(__pyx_v_result);
12761 0 : __Pyx_XDECREF(__pyx_v_item);
12762 0 : __Pyx_XGIVEREF(__pyx_r);
12763 0 : __Pyx_RefNannyFinishContext();
12764 0 : return __pyx_r;
12765 : }
12766 :
12767 : /* "View.MemoryView":700
12768 : * return have_slices or nslices, tuple(result)
12769 : *
12770 : * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1: # <<<<<<<<<<<<<<
12771 : * for suboffset in suboffsets[:ndim]:
12772 : * if suboffset >= 0:
12773 : */
12774 :
12775 0 : static int assert_direct_dimensions(Py_ssize_t *__pyx_v_suboffsets, int __pyx_v_ndim) {
12776 0 : Py_ssize_t __pyx_v_suboffset;
12777 0 : int __pyx_r;
12778 0 : Py_ssize_t *__pyx_t_1;
12779 0 : Py_ssize_t *__pyx_t_2;
12780 0 : Py_ssize_t *__pyx_t_3;
12781 0 : int __pyx_t_4;
12782 0 : int __pyx_lineno = 0;
12783 0 : const char *__pyx_filename = NULL;
12784 0 : int __pyx_clineno = 0;
12785 :
12786 : /* "View.MemoryView":701
12787 : *
12788 : * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1:
12789 : * for suboffset in suboffsets[:ndim]: # <<<<<<<<<<<<<<
12790 : * if suboffset >= 0:
12791 : * raise ValueError, "Indirect dimensions not supported"
12792 : */
12793 0 : __pyx_t_2 = (__pyx_v_suboffsets + __pyx_v_ndim);
12794 0 : for (__pyx_t_3 = __pyx_v_suboffsets; __pyx_t_3 < __pyx_t_2; __pyx_t_3++) {
12795 0 : __pyx_t_1 = __pyx_t_3;
12796 0 : __pyx_v_suboffset = (__pyx_t_1[0]);
12797 :
12798 : /* "View.MemoryView":702
12799 : * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1:
12800 : * for suboffset in suboffsets[:ndim]:
12801 : * if suboffset >= 0: # <<<<<<<<<<<<<<
12802 : * raise ValueError, "Indirect dimensions not supported"
12803 : * return 0 # return type just used as an error flag
12804 : */
12805 0 : __pyx_t_4 = (__pyx_v_suboffset >= 0);
12806 0 : if (unlikely(__pyx_t_4)) {
12807 :
12808 : /* "View.MemoryView":703
12809 : * for suboffset in suboffsets[:ndim]:
12810 : * if suboffset >= 0:
12811 : * raise ValueError, "Indirect dimensions not supported" # <<<<<<<<<<<<<<
12812 : * return 0 # return type just used as an error flag
12813 : *
12814 : */
12815 0 : __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Indirect_dimensions_not_supporte, 0, 0);
12816 0 : __PYX_ERR(1, 703, __pyx_L1_error)
12817 :
12818 : /* "View.MemoryView":702
12819 : * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1:
12820 : * for suboffset in suboffsets[:ndim]:
12821 : * if suboffset >= 0: # <<<<<<<<<<<<<<
12822 : * raise ValueError, "Indirect dimensions not supported"
12823 : * return 0 # return type just used as an error flag
12824 : */
12825 : }
12826 : }
12827 :
12828 : /* "View.MemoryView":704
12829 : * if suboffset >= 0:
12830 : * raise ValueError, "Indirect dimensions not supported"
12831 : * return 0 # return type just used as an error flag # <<<<<<<<<<<<<<
12832 : *
12833 : *
12834 : */
12835 0 : __pyx_r = 0;
12836 0 : goto __pyx_L0;
12837 :
12838 : /* "View.MemoryView":700
12839 : * return have_slices or nslices, tuple(result)
12840 : *
12841 : * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1: # <<<<<<<<<<<<<<
12842 : * for suboffset in suboffsets[:ndim]:
12843 : * if suboffset >= 0:
12844 : */
12845 :
12846 : /* function exit code */
12847 0 : __pyx_L1_error:;
12848 0 : __Pyx_AddTraceback("View.MemoryView.assert_direct_dimensions", __pyx_clineno, __pyx_lineno, __pyx_filename);
12849 0 : __pyx_r = -1;
12850 0 : __pyx_L0:;
12851 0 : return __pyx_r;
12852 : }
12853 :
12854 : /* "View.MemoryView":711
12855 : *
12856 : * @cname('__pyx_memview_slice')
12857 : * cdef memoryview memview_slice(memoryview memview, object indices): # <<<<<<<<<<<<<<
12858 : * cdef int new_ndim = 0, suboffset_dim = -1, dim
12859 : * cdef bint negative_step
12860 : */
12861 :
12862 0 : static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *__pyx_v_memview, PyObject *__pyx_v_indices) {
12863 0 : int __pyx_v_new_ndim;
12864 0 : int __pyx_v_suboffset_dim;
12865 0 : int __pyx_v_dim;
12866 0 : __Pyx_memviewslice __pyx_v_src;
12867 0 : __Pyx_memviewslice __pyx_v_dst;
12868 0 : __Pyx_memviewslice *__pyx_v_p_src;
12869 0 : struct __pyx_memoryviewslice_obj *__pyx_v_memviewsliceobj = 0;
12870 0 : __Pyx_memviewslice *__pyx_v_p_dst;
12871 0 : int *__pyx_v_p_suboffset_dim;
12872 0 : Py_ssize_t __pyx_v_start;
12873 0 : Py_ssize_t __pyx_v_stop;
12874 0 : Py_ssize_t __pyx_v_step;
12875 0 : Py_ssize_t __pyx_v_cindex;
12876 0 : int __pyx_v_have_start;
12877 0 : int __pyx_v_have_stop;
12878 0 : int __pyx_v_have_step;
12879 0 : PyObject *__pyx_v_index = NULL;
12880 0 : struct __pyx_memoryview_obj *__pyx_r = NULL;
12881 : __Pyx_RefNannyDeclarations
12882 0 : int __pyx_t_1;
12883 0 : PyObject *__pyx_t_2 = NULL;
12884 0 : struct __pyx_memoryview_obj *__pyx_t_3;
12885 0 : char *__pyx_t_4;
12886 0 : int __pyx_t_5;
12887 0 : Py_ssize_t __pyx_t_6;
12888 0 : PyObject *(*__pyx_t_7)(PyObject *);
12889 0 : PyObject *__pyx_t_8 = NULL;
12890 0 : Py_ssize_t __pyx_t_9;
12891 0 : int __pyx_t_10;
12892 0 : Py_ssize_t __pyx_t_11;
12893 0 : int __pyx_lineno = 0;
12894 0 : const char *__pyx_filename = NULL;
12895 0 : int __pyx_clineno = 0;
12896 0 : __Pyx_RefNannySetupContext("memview_slice", 1);
12897 :
12898 : /* "View.MemoryView":712
12899 : * @cname('__pyx_memview_slice')
12900 : * cdef memoryview memview_slice(memoryview memview, object indices):
12901 : * cdef int new_ndim = 0, suboffset_dim = -1, dim # <<<<<<<<<<<<<<
12902 : * cdef bint negative_step
12903 : * cdef __Pyx_memviewslice src, dst
12904 : */
12905 0 : __pyx_v_new_ndim = 0;
12906 0 : __pyx_v_suboffset_dim = -1;
12907 :
12908 : /* "View.MemoryView":719
12909 : *
12910 : *
12911 : * memset(&dst, 0, sizeof(dst)) # <<<<<<<<<<<<<<
12912 : *
12913 : * cdef _memoryviewslice memviewsliceobj
12914 : */
12915 0 : (void)(memset((&__pyx_v_dst), 0, (sizeof(__pyx_v_dst))));
12916 :
12917 : /* "View.MemoryView":723
12918 : * cdef _memoryviewslice memviewsliceobj
12919 : *
12920 : * assert memview.view.ndim > 0 # <<<<<<<<<<<<<<
12921 : *
12922 : * if isinstance(memview, _memoryviewslice):
12923 : */
12924 : #ifndef CYTHON_WITHOUT_ASSERTIONS
12925 0 : if (unlikely(__pyx_assertions_enabled())) {
12926 0 : __pyx_t_1 = (__pyx_v_memview->view.ndim > 0);
12927 0 : if (unlikely(!__pyx_t_1)) {
12928 0 : __Pyx_Raise(__pyx_builtin_AssertionError, 0, 0, 0);
12929 0 : __PYX_ERR(1, 723, __pyx_L1_error)
12930 : }
12931 : }
12932 : #else
12933 : if ((1)); else __PYX_ERR(1, 723, __pyx_L1_error)
12934 : #endif
12935 :
12936 : /* "View.MemoryView":725
12937 : * assert memview.view.ndim > 0
12938 : *
12939 : * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
12940 : * memviewsliceobj = memview
12941 : * p_src = &memviewsliceobj.from_slice
12942 : */
12943 0 : __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type);
12944 0 : if (__pyx_t_1) {
12945 :
12946 : /* "View.MemoryView":726
12947 : *
12948 : * if isinstance(memview, _memoryviewslice):
12949 : * memviewsliceobj = memview # <<<<<<<<<<<<<<
12950 : * p_src = &memviewsliceobj.from_slice
12951 : * else:
12952 : */
12953 0 : if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(1, 726, __pyx_L1_error)
12954 0 : __pyx_t_2 = ((PyObject *)__pyx_v_memview);
12955 0 : __Pyx_INCREF(__pyx_t_2);
12956 0 : __pyx_v_memviewsliceobj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2);
12957 0 : __pyx_t_2 = 0;
12958 :
12959 : /* "View.MemoryView":727
12960 : * if isinstance(memview, _memoryviewslice):
12961 : * memviewsliceobj = memview
12962 : * p_src = &memviewsliceobj.from_slice # <<<<<<<<<<<<<<
12963 : * else:
12964 : * slice_copy(memview, &src)
12965 : */
12966 0 : __pyx_v_p_src = (&__pyx_v_memviewsliceobj->from_slice);
12967 :
12968 : /* "View.MemoryView":725
12969 : * assert memview.view.ndim > 0
12970 : *
12971 : * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
12972 : * memviewsliceobj = memview
12973 : * p_src = &memviewsliceobj.from_slice
12974 : */
12975 0 : goto __pyx_L3;
12976 : }
12977 :
12978 : /* "View.MemoryView":729
12979 : * p_src = &memviewsliceobj.from_slice
12980 : * else:
12981 : * slice_copy(memview, &src) # <<<<<<<<<<<<<<
12982 : * p_src = &src
12983 : *
12984 : */
12985 : /*else*/ {
12986 0 : __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_src));
12987 :
12988 : /* "View.MemoryView":730
12989 : * else:
12990 : * slice_copy(memview, &src)
12991 : * p_src = &src # <<<<<<<<<<<<<<
12992 : *
12993 : *
12994 : */
12995 0 : __pyx_v_p_src = (&__pyx_v_src);
12996 : }
12997 0 : __pyx_L3:;
12998 :
12999 : /* "View.MemoryView":736
13000 : *
13001 : *
13002 : * dst.memview = p_src.memview # <<<<<<<<<<<<<<
13003 : * dst.data = p_src.data
13004 : *
13005 : */
13006 0 : __pyx_t_3 = __pyx_v_p_src->memview;
13007 0 : __pyx_v_dst.memview = __pyx_t_3;
13008 :
13009 : /* "View.MemoryView":737
13010 : *
13011 : * dst.memview = p_src.memview
13012 : * dst.data = p_src.data # <<<<<<<<<<<<<<
13013 : *
13014 : *
13015 : */
13016 0 : __pyx_t_4 = __pyx_v_p_src->data;
13017 0 : __pyx_v_dst.data = __pyx_t_4;
13018 :
13019 : /* "View.MemoryView":742
13020 : *
13021 : *
13022 : * cdef __Pyx_memviewslice *p_dst = &dst # <<<<<<<<<<<<<<
13023 : * cdef int *p_suboffset_dim = &suboffset_dim
13024 : * cdef Py_ssize_t start, stop, step, cindex
13025 : */
13026 0 : __pyx_v_p_dst = (&__pyx_v_dst);
13027 :
13028 : /* "View.MemoryView":743
13029 : *
13030 : * cdef __Pyx_memviewslice *p_dst = &dst
13031 : * cdef int *p_suboffset_dim = &suboffset_dim # <<<<<<<<<<<<<<
13032 : * cdef Py_ssize_t start, stop, step, cindex
13033 : * cdef bint have_start, have_stop, have_step
13034 : */
13035 0 : __pyx_v_p_suboffset_dim = (&__pyx_v_suboffset_dim);
13036 :
13037 : /* "View.MemoryView":747
13038 : * cdef bint have_start, have_stop, have_step
13039 : *
13040 : * for dim, index in enumerate(indices): # <<<<<<<<<<<<<<
13041 : * if PyIndex_Check(index):
13042 : * cindex = index
13043 : */
13044 0 : __pyx_t_5 = 0;
13045 0 : if (likely(PyList_CheckExact(__pyx_v_indices)) || PyTuple_CheckExact(__pyx_v_indices)) {
13046 0 : __pyx_t_2 = __pyx_v_indices; __Pyx_INCREF(__pyx_t_2);
13047 0 : __pyx_t_6 = 0;
13048 0 : __pyx_t_7 = NULL;
13049 : } else {
13050 0 : __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_indices); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 747, __pyx_L1_error)
13051 0 : __Pyx_GOTREF(__pyx_t_2);
13052 0 : __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 747, __pyx_L1_error)
13053 : }
13054 0 : for (;;) {
13055 0 : if (likely(!__pyx_t_7)) {
13056 0 : if (likely(PyList_CheckExact(__pyx_t_2))) {
13057 : {
13058 0 : Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
13059 : #if !CYTHON_ASSUME_SAFE_MACROS
13060 : if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 747, __pyx_L1_error)
13061 : #endif
13062 0 : if (__pyx_t_6 >= __pyx_temp) break;
13063 : }
13064 : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13065 0 : __pyx_t_8 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(1, 747, __pyx_L1_error)
13066 : #else
13067 : __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 747, __pyx_L1_error)
13068 : __Pyx_GOTREF(__pyx_t_8);
13069 : #endif
13070 : } else {
13071 : {
13072 0 : Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
13073 : #if !CYTHON_ASSUME_SAFE_MACROS
13074 : if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 747, __pyx_L1_error)
13075 : #endif
13076 0 : if (__pyx_t_6 >= __pyx_temp) break;
13077 : }
13078 : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13079 0 : __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(1, 747, __pyx_L1_error)
13080 : #else
13081 : __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 747, __pyx_L1_error)
13082 : __Pyx_GOTREF(__pyx_t_8);
13083 : #endif
13084 : }
13085 : } else {
13086 0 : __pyx_t_8 = __pyx_t_7(__pyx_t_2);
13087 0 : if (unlikely(!__pyx_t_8)) {
13088 0 : PyObject* exc_type = PyErr_Occurred();
13089 0 : if (exc_type) {
13090 0 : if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
13091 0 : else __PYX_ERR(1, 747, __pyx_L1_error)
13092 : }
13093 : break;
13094 : }
13095 0 : __Pyx_GOTREF(__pyx_t_8);
13096 : }
13097 0 : __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_8);
13098 0 : __pyx_t_8 = 0;
13099 0 : __pyx_v_dim = __pyx_t_5;
13100 0 : __pyx_t_5 = (__pyx_t_5 + 1);
13101 :
13102 : /* "View.MemoryView":748
13103 : *
13104 : * for dim, index in enumerate(indices):
13105 : * if PyIndex_Check(index): # <<<<<<<<<<<<<<
13106 : * cindex = index
13107 : * slice_memviewslice(
13108 : */
13109 0 : __pyx_t_1 = (PyIndex_Check(__pyx_v_index) != 0);
13110 0 : if (__pyx_t_1) {
13111 :
13112 : /* "View.MemoryView":749
13113 : * for dim, index in enumerate(indices):
13114 : * if PyIndex_Check(index):
13115 : * cindex = index # <<<<<<<<<<<<<<
13116 : * slice_memviewslice(
13117 : * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
13118 : */
13119 0 : __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 749, __pyx_L1_error)
13120 0 : __pyx_v_cindex = __pyx_t_9;
13121 :
13122 : /* "View.MemoryView":750
13123 : * if PyIndex_Check(index):
13124 : * cindex = index
13125 : * slice_memviewslice( # <<<<<<<<<<<<<<
13126 : * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
13127 : * dim, new_ndim, p_suboffset_dim,
13128 : */
13129 0 : __pyx_t_10 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_v_cindex, 0, 0, 0, 0, 0, 0); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(1, 750, __pyx_L1_error)
13130 :
13131 : /* "View.MemoryView":748
13132 : *
13133 : * for dim, index in enumerate(indices):
13134 : * if PyIndex_Check(index): # <<<<<<<<<<<<<<
13135 : * cindex = index
13136 : * slice_memviewslice(
13137 : */
13138 0 : goto __pyx_L6;
13139 : }
13140 :
13141 : /* "View.MemoryView":756
13142 : * 0, 0, 0, # have_{start,stop,step}
13143 : * False)
13144 : * elif index is None: # <<<<<<<<<<<<<<
13145 : * p_dst.shape[new_ndim] = 1
13146 : * p_dst.strides[new_ndim] = 0
13147 : */
13148 0 : __pyx_t_1 = (__pyx_v_index == Py_None);
13149 0 : if (__pyx_t_1) {
13150 :
13151 : /* "View.MemoryView":757
13152 : * False)
13153 : * elif index is None:
13154 : * p_dst.shape[new_ndim] = 1 # <<<<<<<<<<<<<<
13155 : * p_dst.strides[new_ndim] = 0
13156 : * p_dst.suboffsets[new_ndim] = -1
13157 : */
13158 0 : (__pyx_v_p_dst->shape[__pyx_v_new_ndim]) = 1;
13159 :
13160 : /* "View.MemoryView":758
13161 : * elif index is None:
13162 : * p_dst.shape[new_ndim] = 1
13163 : * p_dst.strides[new_ndim] = 0 # <<<<<<<<<<<<<<
13164 : * p_dst.suboffsets[new_ndim] = -1
13165 : * new_ndim += 1
13166 : */
13167 0 : (__pyx_v_p_dst->strides[__pyx_v_new_ndim]) = 0;
13168 :
13169 : /* "View.MemoryView":759
13170 : * p_dst.shape[new_ndim] = 1
13171 : * p_dst.strides[new_ndim] = 0
13172 : * p_dst.suboffsets[new_ndim] = -1 # <<<<<<<<<<<<<<
13173 : * new_ndim += 1
13174 : * else:
13175 : */
13176 0 : (__pyx_v_p_dst->suboffsets[__pyx_v_new_ndim]) = -1L;
13177 :
13178 : /* "View.MemoryView":760
13179 : * p_dst.strides[new_ndim] = 0
13180 : * p_dst.suboffsets[new_ndim] = -1
13181 : * new_ndim += 1 # <<<<<<<<<<<<<<
13182 : * else:
13183 : * start = index.start or 0
13184 : */
13185 0 : __pyx_v_new_ndim = (__pyx_v_new_ndim + 1);
13186 :
13187 : /* "View.MemoryView":756
13188 : * 0, 0, 0, # have_{start,stop,step}
13189 : * False)
13190 : * elif index is None: # <<<<<<<<<<<<<<
13191 : * p_dst.shape[new_ndim] = 1
13192 : * p_dst.strides[new_ndim] = 0
13193 : */
13194 0 : goto __pyx_L6;
13195 : }
13196 :
13197 : /* "View.MemoryView":762
13198 : * new_ndim += 1
13199 : * else:
13200 : * start = index.start or 0 # <<<<<<<<<<<<<<
13201 : * stop = index.stop or 0
13202 : * step = index.step or 0
13203 : */
13204 : /*else*/ {
13205 0 : __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 762, __pyx_L1_error)
13206 0 : __Pyx_GOTREF(__pyx_t_8);
13207 0 : __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 762, __pyx_L1_error)
13208 0 : if (!__pyx_t_1) {
13209 0 : __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
13210 : } else {
13211 0 : __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 762, __pyx_L1_error)
13212 0 : __pyx_t_9 = __pyx_t_11;
13213 0 : __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
13214 0 : goto __pyx_L7_bool_binop_done;
13215 : }
13216 : __pyx_t_9 = 0;
13217 0 : __pyx_L7_bool_binop_done:;
13218 0 : __pyx_v_start = __pyx_t_9;
13219 :
13220 : /* "View.MemoryView":763
13221 : * else:
13222 : * start = index.start or 0
13223 : * stop = index.stop or 0 # <<<<<<<<<<<<<<
13224 : * step = index.step or 0
13225 : *
13226 : */
13227 0 : __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 763, __pyx_L1_error)
13228 0 : __Pyx_GOTREF(__pyx_t_8);
13229 0 : __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 763, __pyx_L1_error)
13230 0 : if (!__pyx_t_1) {
13231 0 : __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
13232 : } else {
13233 0 : __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 763, __pyx_L1_error)
13234 0 : __pyx_t_9 = __pyx_t_11;
13235 0 : __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
13236 0 : goto __pyx_L9_bool_binop_done;
13237 : }
13238 : __pyx_t_9 = 0;
13239 0 : __pyx_L9_bool_binop_done:;
13240 0 : __pyx_v_stop = __pyx_t_9;
13241 :
13242 : /* "View.MemoryView":764
13243 : * start = index.start or 0
13244 : * stop = index.stop or 0
13245 : * step = index.step or 0 # <<<<<<<<<<<<<<
13246 : *
13247 : * have_start = index.start is not None
13248 : */
13249 0 : __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 764, __pyx_L1_error)
13250 0 : __Pyx_GOTREF(__pyx_t_8);
13251 0 : __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 764, __pyx_L1_error)
13252 0 : if (!__pyx_t_1) {
13253 0 : __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
13254 : } else {
13255 0 : __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 764, __pyx_L1_error)
13256 0 : __pyx_t_9 = __pyx_t_11;
13257 0 : __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
13258 0 : goto __pyx_L11_bool_binop_done;
13259 : }
13260 : __pyx_t_9 = 0;
13261 0 : __pyx_L11_bool_binop_done:;
13262 0 : __pyx_v_step = __pyx_t_9;
13263 :
13264 : /* "View.MemoryView":766
13265 : * step = index.step or 0
13266 : *
13267 : * have_start = index.start is not None # <<<<<<<<<<<<<<
13268 : * have_stop = index.stop is not None
13269 : * have_step = index.step is not None
13270 : */
13271 0 : __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 766, __pyx_L1_error)
13272 0 : __Pyx_GOTREF(__pyx_t_8);
13273 0 : __pyx_t_1 = (__pyx_t_8 != Py_None);
13274 0 : __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
13275 0 : __pyx_v_have_start = __pyx_t_1;
13276 :
13277 : /* "View.MemoryView":767
13278 : *
13279 : * have_start = index.start is not None
13280 : * have_stop = index.stop is not None # <<<<<<<<<<<<<<
13281 : * have_step = index.step is not None
13282 : *
13283 : */
13284 0 : __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 767, __pyx_L1_error)
13285 0 : __Pyx_GOTREF(__pyx_t_8);
13286 0 : __pyx_t_1 = (__pyx_t_8 != Py_None);
13287 0 : __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
13288 0 : __pyx_v_have_stop = __pyx_t_1;
13289 :
13290 : /* "View.MemoryView":768
13291 : * have_start = index.start is not None
13292 : * have_stop = index.stop is not None
13293 : * have_step = index.step is not None # <<<<<<<<<<<<<<
13294 : *
13295 : * slice_memviewslice(
13296 : */
13297 0 : __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 768, __pyx_L1_error)
13298 0 : __Pyx_GOTREF(__pyx_t_8);
13299 0 : __pyx_t_1 = (__pyx_t_8 != Py_None);
13300 0 : __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
13301 0 : __pyx_v_have_step = __pyx_t_1;
13302 :
13303 : /* "View.MemoryView":770
13304 : * have_step = index.step is not None
13305 : *
13306 : * slice_memviewslice( # <<<<<<<<<<<<<<
13307 : * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
13308 : * dim, new_ndim, p_suboffset_dim,
13309 : */
13310 0 : __pyx_t_10 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_v_start, __pyx_v_stop, __pyx_v_step, __pyx_v_have_start, __pyx_v_have_stop, __pyx_v_have_step, 1); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(1, 770, __pyx_L1_error)
13311 :
13312 : /* "View.MemoryView":776
13313 : * have_start, have_stop, have_step,
13314 : * True)
13315 : * new_ndim += 1 # <<<<<<<<<<<<<<
13316 : *
13317 : * if isinstance(memview, _memoryviewslice):
13318 : */
13319 0 : __pyx_v_new_ndim = (__pyx_v_new_ndim + 1);
13320 : }
13321 0 : __pyx_L6:;
13322 :
13323 : /* "View.MemoryView":747
13324 : * cdef bint have_start, have_stop, have_step
13325 : *
13326 : * for dim, index in enumerate(indices): # <<<<<<<<<<<<<<
13327 : * if PyIndex_Check(index):
13328 : * cindex = index
13329 : */
13330 : }
13331 0 : __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13332 :
13333 : /* "View.MemoryView":778
13334 : * new_ndim += 1
13335 : *
13336 : * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
13337 : * return memoryview_fromslice(dst, new_ndim,
13338 : * memviewsliceobj.to_object_func,
13339 : */
13340 0 : __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type);
13341 0 : if (__pyx_t_1) {
13342 :
13343 : /* "View.MemoryView":779
13344 : *
13345 : * if isinstance(memview, _memoryviewslice):
13346 : * return memoryview_fromslice(dst, new_ndim, # <<<<<<<<<<<<<<
13347 : * memviewsliceobj.to_object_func,
13348 : * memviewsliceobj.to_dtype_func,
13349 : */
13350 0 : __Pyx_XDECREF((PyObject *)__pyx_r);
13351 :
13352 : /* "View.MemoryView":780
13353 : * if isinstance(memview, _memoryviewslice):
13354 : * return memoryview_fromslice(dst, new_ndim,
13355 : * memviewsliceobj.to_object_func, # <<<<<<<<<<<<<<
13356 : * memviewsliceobj.to_dtype_func,
13357 : * memview.dtype_is_object)
13358 : */
13359 0 : if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(1, 780, __pyx_L1_error) }
13360 :
13361 : /* "View.MemoryView":781
13362 : * return memoryview_fromslice(dst, new_ndim,
13363 : * memviewsliceobj.to_object_func,
13364 : * memviewsliceobj.to_dtype_func, # <<<<<<<<<<<<<<
13365 : * memview.dtype_is_object)
13366 : * else:
13367 : */
13368 0 : if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(1, 781, __pyx_L1_error) }
13369 :
13370 : /* "View.MemoryView":779
13371 : *
13372 : * if isinstance(memview, _memoryviewslice):
13373 : * return memoryview_fromslice(dst, new_ndim, # <<<<<<<<<<<<<<
13374 : * memviewsliceobj.to_object_func,
13375 : * memviewsliceobj.to_dtype_func,
13376 : */
13377 0 : __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, __pyx_v_memviewsliceobj->to_object_func, __pyx_v_memviewsliceobj->to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 779, __pyx_L1_error)
13378 0 : __Pyx_GOTREF(__pyx_t_2);
13379 0 : if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_memoryview_type))))) __PYX_ERR(1, 779, __pyx_L1_error)
13380 0 : __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_2);
13381 0 : __pyx_t_2 = 0;
13382 0 : goto __pyx_L0;
13383 :
13384 : /* "View.MemoryView":778
13385 : * new_ndim += 1
13386 : *
13387 : * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
13388 : * return memoryview_fromslice(dst, new_ndim,
13389 : * memviewsliceobj.to_object_func,
13390 : */
13391 : }
13392 :
13393 : /* "View.MemoryView":784
13394 : * memview.dtype_is_object)
13395 : * else:
13396 : * return memoryview_fromslice(dst, new_ndim, NULL, NULL, # <<<<<<<<<<<<<<
13397 : * memview.dtype_is_object)
13398 : *
13399 : */
13400 : /*else*/ {
13401 0 : __Pyx_XDECREF((PyObject *)__pyx_r);
13402 :
13403 : /* "View.MemoryView":785
13404 : * else:
13405 : * return memoryview_fromslice(dst, new_ndim, NULL, NULL,
13406 : * memview.dtype_is_object) # <<<<<<<<<<<<<<
13407 : *
13408 : *
13409 : */
13410 0 : __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, NULL, NULL, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 784, __pyx_L1_error)
13411 0 : __Pyx_GOTREF(__pyx_t_2);
13412 :
13413 : /* "View.MemoryView":784
13414 : * memview.dtype_is_object)
13415 : * else:
13416 : * return memoryview_fromslice(dst, new_ndim, NULL, NULL, # <<<<<<<<<<<<<<
13417 : * memview.dtype_is_object)
13418 : *
13419 : */
13420 0 : if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_memoryview_type))))) __PYX_ERR(1, 784, __pyx_L1_error)
13421 0 : __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_2);
13422 0 : __pyx_t_2 = 0;
13423 0 : goto __pyx_L0;
13424 : }
13425 :
13426 : /* "View.MemoryView":711
13427 : *
13428 : * @cname('__pyx_memview_slice')
13429 : * cdef memoryview memview_slice(memoryview memview, object indices): # <<<<<<<<<<<<<<
13430 : * cdef int new_ndim = 0, suboffset_dim = -1, dim
13431 : * cdef bint negative_step
13432 : */
13433 :
13434 : /* function exit code */
13435 0 : __pyx_L1_error:;
13436 0 : __Pyx_XDECREF(__pyx_t_2);
13437 0 : __Pyx_XDECREF(__pyx_t_8);
13438 0 : __Pyx_AddTraceback("View.MemoryView.memview_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
13439 0 : __pyx_r = 0;
13440 0 : __pyx_L0:;
13441 0 : __Pyx_XDECREF((PyObject *)__pyx_v_memviewsliceobj);
13442 0 : __Pyx_XDECREF(__pyx_v_index);
13443 0 : __Pyx_XGIVEREF((PyObject *)__pyx_r);
13444 0 : __Pyx_RefNannyFinishContext();
13445 0 : return __pyx_r;
13446 : }
13447 :
13448 : /* "View.MemoryView":793
13449 : *
13450 : * @cname('__pyx_memoryview_slice_memviewslice')
13451 : * cdef int slice_memviewslice( # <<<<<<<<<<<<<<
13452 : * __Pyx_memviewslice *dst,
13453 : * Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset,
13454 : */
13455 :
13456 3504 : static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst, Py_ssize_t __pyx_v_shape, Py_ssize_t __pyx_v_stride, Py_ssize_t __pyx_v_suboffset, int __pyx_v_dim, int __pyx_v_new_ndim, int *__pyx_v_suboffset_dim, Py_ssize_t __pyx_v_start, Py_ssize_t __pyx_v_stop, Py_ssize_t __pyx_v_step, int __pyx_v_have_start, int __pyx_v_have_stop, int __pyx_v_have_step, int __pyx_v_is_slice) {
13457 3504 : Py_ssize_t __pyx_v_new_shape;
13458 3504 : int __pyx_v_negative_step;
13459 3504 : int __pyx_r;
13460 3504 : int __pyx_t_1;
13461 3504 : int __pyx_t_2;
13462 3504 : int __pyx_t_3;
13463 3504 : int __pyx_lineno = 0;
13464 3504 : const char *__pyx_filename = NULL;
13465 3504 : int __pyx_clineno = 0;
13466 : #ifdef WITH_THREAD
13467 3504 : PyGILState_STATE __pyx_gilstate_save;
13468 : #endif
13469 :
13470 : /* "View.MemoryView":813
13471 : * cdef bint negative_step
13472 : *
13473 : * if not is_slice: # <<<<<<<<<<<<<<
13474 : *
13475 : * if start < 0:
13476 : */
13477 3504 : __pyx_t_1 = (!__pyx_v_is_slice);
13478 3504 : if (__pyx_t_1) {
13479 :
13480 : /* "View.MemoryView":815
13481 : * if not is_slice:
13482 : *
13483 : * if start < 0: # <<<<<<<<<<<<<<
13484 : * start += shape
13485 : * if not 0 <= start < shape:
13486 : */
13487 0 : __pyx_t_1 = (__pyx_v_start < 0);
13488 0 : if (__pyx_t_1) {
13489 :
13490 : /* "View.MemoryView":816
13491 : *
13492 : * if start < 0:
13493 : * start += shape # <<<<<<<<<<<<<<
13494 : * if not 0 <= start < shape:
13495 : * _err_dim(PyExc_IndexError, "Index out of bounds (axis %d)", dim)
13496 : */
13497 0 : __pyx_v_start = (__pyx_v_start + __pyx_v_shape);
13498 :
13499 : /* "View.MemoryView":815
13500 : * if not is_slice:
13501 : *
13502 : * if start < 0: # <<<<<<<<<<<<<<
13503 : * start += shape
13504 : * if not 0 <= start < shape:
13505 : */
13506 : }
13507 :
13508 : /* "View.MemoryView":817
13509 : * if start < 0:
13510 : * start += shape
13511 : * if not 0 <= start < shape: # <<<<<<<<<<<<<<
13512 : * _err_dim(PyExc_IndexError, "Index out of bounds (axis %d)", dim)
13513 : * else:
13514 : */
13515 0 : __pyx_t_1 = (0 <= __pyx_v_start);
13516 0 : if (__pyx_t_1) {
13517 0 : __pyx_t_1 = (__pyx_v_start < __pyx_v_shape);
13518 : }
13519 0 : __pyx_t_2 = (!__pyx_t_1);
13520 0 : if (__pyx_t_2) {
13521 :
13522 : /* "View.MemoryView":818
13523 : * start += shape
13524 : * if not 0 <= start < shape:
13525 : * _err_dim(PyExc_IndexError, "Index out of bounds (axis %d)", dim) # <<<<<<<<<<<<<<
13526 : * else:
13527 : *
13528 : */
13529 0 : __pyx_t_3 = __pyx_memoryview_err_dim(PyExc_IndexError, __pyx_kp_s_Index_out_of_bounds_axis_d, __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 818, __pyx_L1_error)
13530 :
13531 : /* "View.MemoryView":817
13532 : * if start < 0:
13533 : * start += shape
13534 : * if not 0 <= start < shape: # <<<<<<<<<<<<<<
13535 : * _err_dim(PyExc_IndexError, "Index out of bounds (axis %d)", dim)
13536 : * else:
13537 : */
13538 : }
13539 :
13540 : /* "View.MemoryView":813
13541 : * cdef bint negative_step
13542 : *
13543 : * if not is_slice: # <<<<<<<<<<<<<<
13544 : *
13545 : * if start < 0:
13546 : */
13547 0 : goto __pyx_L3;
13548 : }
13549 :
13550 : /* "View.MemoryView":821
13551 : * else:
13552 : *
13553 : * if have_step: # <<<<<<<<<<<<<<
13554 : * negative_step = step < 0
13555 : * if step == 0:
13556 : */
13557 : /*else*/ {
13558 3504 : __pyx_t_2 = (__pyx_v_have_step != 0);
13559 3504 : if (__pyx_t_2) {
13560 :
13561 : /* "View.MemoryView":822
13562 : *
13563 : * if have_step:
13564 : * negative_step = step < 0 # <<<<<<<<<<<<<<
13565 : * if step == 0:
13566 : * _err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim)
13567 : */
13568 0 : __pyx_v_negative_step = (__pyx_v_step < 0);
13569 :
13570 : /* "View.MemoryView":823
13571 : * if have_step:
13572 : * negative_step = step < 0
13573 : * if step == 0: # <<<<<<<<<<<<<<
13574 : * _err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim)
13575 : * else:
13576 : */
13577 0 : __pyx_t_2 = (__pyx_v_step == 0);
13578 0 : if (__pyx_t_2) {
13579 :
13580 : /* "View.MemoryView":824
13581 : * negative_step = step < 0
13582 : * if step == 0:
13583 : * _err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim) # <<<<<<<<<<<<<<
13584 : * else:
13585 : * negative_step = False
13586 : */
13587 0 : __pyx_t_3 = __pyx_memoryview_err_dim(PyExc_ValueError, __pyx_kp_s_Step_may_not_be_zero_axis_d, __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 824, __pyx_L1_error)
13588 :
13589 : /* "View.MemoryView":823
13590 : * if have_step:
13591 : * negative_step = step < 0
13592 : * if step == 0: # <<<<<<<<<<<<<<
13593 : * _err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim)
13594 : * else:
13595 : */
13596 : }
13597 :
13598 : /* "View.MemoryView":821
13599 : * else:
13600 : *
13601 : * if have_step: # <<<<<<<<<<<<<<
13602 : * negative_step = step < 0
13603 : * if step == 0:
13604 : */
13605 0 : goto __pyx_L6;
13606 : }
13607 :
13608 : /* "View.MemoryView":826
13609 : * _err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim)
13610 : * else:
13611 : * negative_step = False # <<<<<<<<<<<<<<
13612 : * step = 1
13613 : *
13614 : */
13615 : /*else*/ {
13616 : __pyx_v_negative_step = 0;
13617 :
13618 : /* "View.MemoryView":827
13619 : * else:
13620 : * negative_step = False
13621 : * step = 1 # <<<<<<<<<<<<<<
13622 : *
13623 : *
13624 : */
13625 : __pyx_v_step = 1;
13626 : }
13627 3504 : __pyx_L6:;
13628 :
13629 : /* "View.MemoryView":830
13630 : *
13631 : *
13632 : * if have_start: # <<<<<<<<<<<<<<
13633 : * if start < 0:
13634 : * start += shape
13635 : */
13636 3504 : __pyx_t_2 = (__pyx_v_have_start != 0);
13637 3504 : if (__pyx_t_2) {
13638 :
13639 : /* "View.MemoryView":831
13640 : *
13641 : * if have_start:
13642 : * if start < 0: # <<<<<<<<<<<<<<
13643 : * start += shape
13644 : * if start < 0:
13645 : */
13646 0 : __pyx_t_2 = (__pyx_v_start < 0);
13647 0 : if (__pyx_t_2) {
13648 :
13649 : /* "View.MemoryView":832
13650 : * if have_start:
13651 : * if start < 0:
13652 : * start += shape # <<<<<<<<<<<<<<
13653 : * if start < 0:
13654 : * start = 0
13655 : */
13656 0 : __pyx_v_start = (__pyx_v_start + __pyx_v_shape);
13657 :
13658 : /* "View.MemoryView":833
13659 : * if start < 0:
13660 : * start += shape
13661 : * if start < 0: # <<<<<<<<<<<<<<
13662 : * start = 0
13663 : * elif start >= shape:
13664 : */
13665 0 : __pyx_t_2 = (__pyx_v_start < 0);
13666 0 : if (__pyx_t_2) {
13667 :
13668 : /* "View.MemoryView":834
13669 : * start += shape
13670 : * if start < 0:
13671 : * start = 0 # <<<<<<<<<<<<<<
13672 : * elif start >= shape:
13673 : * if negative_step:
13674 : */
13675 : __pyx_v_start = 0;
13676 :
13677 : /* "View.MemoryView":833
13678 : * if start < 0:
13679 : * start += shape
13680 : * if start < 0: # <<<<<<<<<<<<<<
13681 : * start = 0
13682 : * elif start >= shape:
13683 : */
13684 : }
13685 :
13686 : /* "View.MemoryView":831
13687 : *
13688 : * if have_start:
13689 : * if start < 0: # <<<<<<<<<<<<<<
13690 : * start += shape
13691 : * if start < 0:
13692 : */
13693 0 : goto __pyx_L9;
13694 : }
13695 :
13696 : /* "View.MemoryView":835
13697 : * if start < 0:
13698 : * start = 0
13699 : * elif start >= shape: # <<<<<<<<<<<<<<
13700 : * if negative_step:
13701 : * start = shape - 1
13702 : */
13703 0 : __pyx_t_2 = (__pyx_v_start >= __pyx_v_shape);
13704 0 : if (__pyx_t_2) {
13705 :
13706 : /* "View.MemoryView":836
13707 : * start = 0
13708 : * elif start >= shape:
13709 : * if negative_step: # <<<<<<<<<<<<<<
13710 : * start = shape - 1
13711 : * else:
13712 : */
13713 0 : if (__pyx_v_negative_step) {
13714 :
13715 : /* "View.MemoryView":837
13716 : * elif start >= shape:
13717 : * if negative_step:
13718 : * start = shape - 1 # <<<<<<<<<<<<<<
13719 : * else:
13720 : * start = shape
13721 : */
13722 0 : __pyx_v_start = (__pyx_v_shape - 1);
13723 :
13724 : /* "View.MemoryView":836
13725 : * start = 0
13726 : * elif start >= shape:
13727 : * if negative_step: # <<<<<<<<<<<<<<
13728 : * start = shape - 1
13729 : * else:
13730 : */
13731 0 : goto __pyx_L11;
13732 : }
13733 :
13734 : /* "View.MemoryView":839
13735 : * start = shape - 1
13736 : * else:
13737 : * start = shape # <<<<<<<<<<<<<<
13738 : * else:
13739 : * if negative_step:
13740 : */
13741 : /*else*/ {
13742 : __pyx_v_start = __pyx_v_shape;
13743 : }
13744 0 : __pyx_L11:;
13745 :
13746 : /* "View.MemoryView":835
13747 : * if start < 0:
13748 : * start = 0
13749 : * elif start >= shape: # <<<<<<<<<<<<<<
13750 : * if negative_step:
13751 : * start = shape - 1
13752 : */
13753 : }
13754 0 : __pyx_L9:;
13755 :
13756 : /* "View.MemoryView":830
13757 : *
13758 : *
13759 : * if have_start: # <<<<<<<<<<<<<<
13760 : * if start < 0:
13761 : * start += shape
13762 : */
13763 0 : goto __pyx_L8;
13764 : }
13765 :
13766 : /* "View.MemoryView":841
13767 : * start = shape
13768 : * else:
13769 : * if negative_step: # <<<<<<<<<<<<<<
13770 : * start = shape - 1
13771 : * else:
13772 : */
13773 : /*else*/ {
13774 3504 : if (__pyx_v_negative_step) {
13775 :
13776 : /* "View.MemoryView":842
13777 : * else:
13778 : * if negative_step:
13779 : * start = shape - 1 # <<<<<<<<<<<<<<
13780 : * else:
13781 : * start = 0
13782 : */
13783 0 : __pyx_v_start = (__pyx_v_shape - 1);
13784 :
13785 : /* "View.MemoryView":841
13786 : * start = shape
13787 : * else:
13788 : * if negative_step: # <<<<<<<<<<<<<<
13789 : * start = shape - 1
13790 : * else:
13791 : */
13792 0 : goto __pyx_L12;
13793 : }
13794 :
13795 : /* "View.MemoryView":844
13796 : * start = shape - 1
13797 : * else:
13798 : * start = 0 # <<<<<<<<<<<<<<
13799 : *
13800 : * if have_stop:
13801 : */
13802 : /*else*/ {
13803 : __pyx_v_start = 0;
13804 : }
13805 3504 : __pyx_L12:;
13806 : }
13807 3504 : __pyx_L8:;
13808 :
13809 : /* "View.MemoryView":846
13810 : * start = 0
13811 : *
13812 : * if have_stop: # <<<<<<<<<<<<<<
13813 : * if stop < 0:
13814 : * stop += shape
13815 : */
13816 3504 : __pyx_t_2 = (__pyx_v_have_stop != 0);
13817 3504 : if (__pyx_t_2) {
13818 :
13819 : /* "View.MemoryView":847
13820 : *
13821 : * if have_stop:
13822 : * if stop < 0: # <<<<<<<<<<<<<<
13823 : * stop += shape
13824 : * if stop < 0:
13825 : */
13826 3504 : __pyx_t_2 = (__pyx_v_stop < 0);
13827 3504 : if (__pyx_t_2) {
13828 :
13829 : /* "View.MemoryView":848
13830 : * if have_stop:
13831 : * if stop < 0:
13832 : * stop += shape # <<<<<<<<<<<<<<
13833 : * if stop < 0:
13834 : * stop = 0
13835 : */
13836 0 : __pyx_v_stop = (__pyx_v_stop + __pyx_v_shape);
13837 :
13838 : /* "View.MemoryView":849
13839 : * if stop < 0:
13840 : * stop += shape
13841 : * if stop < 0: # <<<<<<<<<<<<<<
13842 : * stop = 0
13843 : * elif stop > shape:
13844 : */
13845 0 : __pyx_t_2 = (__pyx_v_stop < 0);
13846 0 : if (__pyx_t_2) {
13847 :
13848 : /* "View.MemoryView":850
13849 : * stop += shape
13850 : * if stop < 0:
13851 : * stop = 0 # <<<<<<<<<<<<<<
13852 : * elif stop > shape:
13853 : * stop = shape
13854 : */
13855 : __pyx_v_stop = 0;
13856 :
13857 : /* "View.MemoryView":849
13858 : * if stop < 0:
13859 : * stop += shape
13860 : * if stop < 0: # <<<<<<<<<<<<<<
13861 : * stop = 0
13862 : * elif stop > shape:
13863 : */
13864 : }
13865 :
13866 : /* "View.MemoryView":847
13867 : *
13868 : * if have_stop:
13869 : * if stop < 0: # <<<<<<<<<<<<<<
13870 : * stop += shape
13871 : * if stop < 0:
13872 : */
13873 0 : goto __pyx_L14;
13874 : }
13875 :
13876 : /* "View.MemoryView":851
13877 : * if stop < 0:
13878 : * stop = 0
13879 : * elif stop > shape: # <<<<<<<<<<<<<<
13880 : * stop = shape
13881 : * else:
13882 : */
13883 3504 : __pyx_t_2 = (__pyx_v_stop > __pyx_v_shape);
13884 3504 : if (__pyx_t_2) {
13885 :
13886 : /* "View.MemoryView":852
13887 : * stop = 0
13888 : * elif stop > shape:
13889 : * stop = shape # <<<<<<<<<<<<<<
13890 : * else:
13891 : * if negative_step:
13892 : */
13893 : __pyx_v_stop = __pyx_v_shape;
13894 :
13895 : /* "View.MemoryView":851
13896 : * if stop < 0:
13897 : * stop = 0
13898 : * elif stop > shape: # <<<<<<<<<<<<<<
13899 : * stop = shape
13900 : * else:
13901 : */
13902 : }
13903 3504 : __pyx_L14:;
13904 :
13905 : /* "View.MemoryView":846
13906 : * start = 0
13907 : *
13908 : * if have_stop: # <<<<<<<<<<<<<<
13909 : * if stop < 0:
13910 : * stop += shape
13911 : */
13912 3504 : goto __pyx_L13;
13913 : }
13914 :
13915 : /* "View.MemoryView":854
13916 : * stop = shape
13917 : * else:
13918 : * if negative_step: # <<<<<<<<<<<<<<
13919 : * stop = -1
13920 : * else:
13921 : */
13922 : /*else*/ {
13923 0 : if (__pyx_v_negative_step) {
13924 :
13925 : /* "View.MemoryView":855
13926 : * else:
13927 : * if negative_step:
13928 : * stop = -1 # <<<<<<<<<<<<<<
13929 : * else:
13930 : * stop = shape
13931 : */
13932 0 : __pyx_v_stop = -1L;
13933 :
13934 : /* "View.MemoryView":854
13935 : * stop = shape
13936 : * else:
13937 : * if negative_step: # <<<<<<<<<<<<<<
13938 : * stop = -1
13939 : * else:
13940 : */
13941 0 : goto __pyx_L16;
13942 : }
13943 :
13944 : /* "View.MemoryView":857
13945 : * stop = -1
13946 : * else:
13947 : * stop = shape # <<<<<<<<<<<<<<
13948 : *
13949 : *
13950 : */
13951 : /*else*/ {
13952 : __pyx_v_stop = __pyx_v_shape;
13953 : }
13954 3504 : __pyx_L16:;
13955 : }
13956 3504 : __pyx_L13:;
13957 :
13958 : /* "View.MemoryView":861
13959 : *
13960 : * with cython.cdivision(True):
13961 : * new_shape = (stop - start) // step # <<<<<<<<<<<<<<
13962 : *
13963 : * if (stop - start) - step * new_shape:
13964 : */
13965 3504 : __pyx_v_new_shape = ((__pyx_v_stop - __pyx_v_start) / __pyx_v_step);
13966 :
13967 : /* "View.MemoryView":863
13968 : * new_shape = (stop - start) // step
13969 : *
13970 : * if (stop - start) - step * new_shape: # <<<<<<<<<<<<<<
13971 : * new_shape += 1
13972 : *
13973 : */
13974 3504 : __pyx_t_2 = (((__pyx_v_stop - __pyx_v_start) - (__pyx_v_step * __pyx_v_new_shape)) != 0);
13975 3504 : if (__pyx_t_2) {
13976 :
13977 : /* "View.MemoryView":864
13978 : *
13979 : * if (stop - start) - step * new_shape:
13980 : * new_shape += 1 # <<<<<<<<<<<<<<
13981 : *
13982 : * if new_shape < 0:
13983 : */
13984 0 : __pyx_v_new_shape = (__pyx_v_new_shape + 1);
13985 :
13986 : /* "View.MemoryView":863
13987 : * new_shape = (stop - start) // step
13988 : *
13989 : * if (stop - start) - step * new_shape: # <<<<<<<<<<<<<<
13990 : * new_shape += 1
13991 : *
13992 : */
13993 : }
13994 :
13995 : /* "View.MemoryView":866
13996 : * new_shape += 1
13997 : *
13998 : * if new_shape < 0: # <<<<<<<<<<<<<<
13999 : * new_shape = 0
14000 : *
14001 : */
14002 3504 : __pyx_t_2 = (__pyx_v_new_shape < 0);
14003 3504 : if (__pyx_t_2) {
14004 :
14005 : /* "View.MemoryView":867
14006 : *
14007 : * if new_shape < 0:
14008 : * new_shape = 0 # <<<<<<<<<<<<<<
14009 : *
14010 : *
14011 : */
14012 : __pyx_v_new_shape = 0;
14013 :
14014 : /* "View.MemoryView":866
14015 : * new_shape += 1
14016 : *
14017 : * if new_shape < 0: # <<<<<<<<<<<<<<
14018 : * new_shape = 0
14019 : *
14020 : */
14021 : }
14022 :
14023 : /* "View.MemoryView":870
14024 : *
14025 : *
14026 : * dst.strides[new_ndim] = stride * step # <<<<<<<<<<<<<<
14027 : * dst.shape[new_ndim] = new_shape
14028 : * dst.suboffsets[new_ndim] = suboffset
14029 : */
14030 3504 : (__pyx_v_dst->strides[__pyx_v_new_ndim]) = (__pyx_v_stride * __pyx_v_step);
14031 :
14032 : /* "View.MemoryView":871
14033 : *
14034 : * dst.strides[new_ndim] = stride * step
14035 : * dst.shape[new_ndim] = new_shape # <<<<<<<<<<<<<<
14036 : * dst.suboffsets[new_ndim] = suboffset
14037 : *
14038 : */
14039 3504 : (__pyx_v_dst->shape[__pyx_v_new_ndim]) = __pyx_v_new_shape;
14040 :
14041 : /* "View.MemoryView":872
14042 : * dst.strides[new_ndim] = stride * step
14043 : * dst.shape[new_ndim] = new_shape
14044 : * dst.suboffsets[new_ndim] = suboffset # <<<<<<<<<<<<<<
14045 : *
14046 : *
14047 : */
14048 3504 : (__pyx_v_dst->suboffsets[__pyx_v_new_ndim]) = __pyx_v_suboffset;
14049 : }
14050 3504 : __pyx_L3:;
14051 :
14052 : /* "View.MemoryView":875
14053 : *
14054 : *
14055 : * if suboffset_dim[0] < 0: # <<<<<<<<<<<<<<
14056 : * dst.data += start * stride
14057 : * else:
14058 : */
14059 3504 : __pyx_t_2 = ((__pyx_v_suboffset_dim[0]) < 0);
14060 3504 : if (__pyx_t_2) {
14061 :
14062 : /* "View.MemoryView":876
14063 : *
14064 : * if suboffset_dim[0] < 0:
14065 : * dst.data += start * stride # <<<<<<<<<<<<<<
14066 : * else:
14067 : * dst.suboffsets[suboffset_dim[0]] += start * stride
14068 : */
14069 3504 : __pyx_v_dst->data = (__pyx_v_dst->data + (__pyx_v_start * __pyx_v_stride));
14070 :
14071 : /* "View.MemoryView":875
14072 : *
14073 : *
14074 : * if suboffset_dim[0] < 0: # <<<<<<<<<<<<<<
14075 : * dst.data += start * stride
14076 : * else:
14077 : */
14078 3504 : goto __pyx_L19;
14079 : }
14080 :
14081 : /* "View.MemoryView":878
14082 : * dst.data += start * stride
14083 : * else:
14084 : * dst.suboffsets[suboffset_dim[0]] += start * stride # <<<<<<<<<<<<<<
14085 : *
14086 : * if suboffset >= 0:
14087 : */
14088 : /*else*/ {
14089 0 : __pyx_t_3 = (__pyx_v_suboffset_dim[0]);
14090 0 : (__pyx_v_dst->suboffsets[__pyx_t_3]) = ((__pyx_v_dst->suboffsets[__pyx_t_3]) + (__pyx_v_start * __pyx_v_stride));
14091 : }
14092 3504 : __pyx_L19:;
14093 :
14094 : /* "View.MemoryView":880
14095 : * dst.suboffsets[suboffset_dim[0]] += start * stride
14096 : *
14097 : * if suboffset >= 0: # <<<<<<<<<<<<<<
14098 : * if not is_slice:
14099 : * if new_ndim == 0:
14100 : */
14101 3504 : __pyx_t_2 = (__pyx_v_suboffset >= 0);
14102 3504 : if (__pyx_t_2) {
14103 :
14104 : /* "View.MemoryView":881
14105 : *
14106 : * if suboffset >= 0:
14107 : * if not is_slice: # <<<<<<<<<<<<<<
14108 : * if new_ndim == 0:
14109 : * dst.data = (<char **> dst.data)[0] + suboffset
14110 : */
14111 0 : __pyx_t_2 = (!__pyx_v_is_slice);
14112 0 : if (__pyx_t_2) {
14113 :
14114 : /* "View.MemoryView":882
14115 : * if suboffset >= 0:
14116 : * if not is_slice:
14117 : * if new_ndim == 0: # <<<<<<<<<<<<<<
14118 : * dst.data = (<char **> dst.data)[0] + suboffset
14119 : * else:
14120 : */
14121 0 : __pyx_t_2 = (__pyx_v_new_ndim == 0);
14122 0 : if (__pyx_t_2) {
14123 :
14124 : /* "View.MemoryView":883
14125 : * if not is_slice:
14126 : * if new_ndim == 0:
14127 : * dst.data = (<char **> dst.data)[0] + suboffset # <<<<<<<<<<<<<<
14128 : * else:
14129 : * _err_dim(PyExc_IndexError, "All dimensions preceding dimension %d "
14130 : */
14131 0 : __pyx_v_dst->data = ((((char **)__pyx_v_dst->data)[0]) + __pyx_v_suboffset);
14132 :
14133 : /* "View.MemoryView":882
14134 : * if suboffset >= 0:
14135 : * if not is_slice:
14136 : * if new_ndim == 0: # <<<<<<<<<<<<<<
14137 : * dst.data = (<char **> dst.data)[0] + suboffset
14138 : * else:
14139 : */
14140 0 : goto __pyx_L22;
14141 : }
14142 :
14143 : /* "View.MemoryView":885
14144 : * dst.data = (<char **> dst.data)[0] + suboffset
14145 : * else:
14146 : * _err_dim(PyExc_IndexError, "All dimensions preceding dimension %d " # <<<<<<<<<<<<<<
14147 : * "must be indexed and not sliced", dim)
14148 : * else:
14149 : */
14150 : /*else*/ {
14151 :
14152 : /* "View.MemoryView":886
14153 : * else:
14154 : * _err_dim(PyExc_IndexError, "All dimensions preceding dimension %d "
14155 : * "must be indexed and not sliced", dim) # <<<<<<<<<<<<<<
14156 : * else:
14157 : * suboffset_dim[0] = new_ndim
14158 : */
14159 0 : __pyx_t_3 = __pyx_memoryview_err_dim(PyExc_IndexError, __pyx_kp_s_All_dimensions_preceding_dimensi, __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 885, __pyx_L1_error)
14160 : }
14161 0 : __pyx_L22:;
14162 :
14163 : /* "View.MemoryView":881
14164 : *
14165 : * if suboffset >= 0:
14166 : * if not is_slice: # <<<<<<<<<<<<<<
14167 : * if new_ndim == 0:
14168 : * dst.data = (<char **> dst.data)[0] + suboffset
14169 : */
14170 0 : goto __pyx_L21;
14171 : }
14172 :
14173 : /* "View.MemoryView":888
14174 : * "must be indexed and not sliced", dim)
14175 : * else:
14176 : * suboffset_dim[0] = new_ndim # <<<<<<<<<<<<<<
14177 : *
14178 : * return 0
14179 : */
14180 : /*else*/ {
14181 0 : (__pyx_v_suboffset_dim[0]) = __pyx_v_new_ndim;
14182 : }
14183 3504 : __pyx_L21:;
14184 :
14185 : /* "View.MemoryView":880
14186 : * dst.suboffsets[suboffset_dim[0]] += start * stride
14187 : *
14188 : * if suboffset >= 0: # <<<<<<<<<<<<<<
14189 : * if not is_slice:
14190 : * if new_ndim == 0:
14191 : */
14192 : }
14193 :
14194 : /* "View.MemoryView":890
14195 : * suboffset_dim[0] = new_ndim
14196 : *
14197 : * return 0 # <<<<<<<<<<<<<<
14198 : *
14199 : *
14200 : */
14201 3504 : __pyx_r = 0;
14202 3504 : goto __pyx_L0;
14203 :
14204 : /* "View.MemoryView":793
14205 : *
14206 : * @cname('__pyx_memoryview_slice_memviewslice')
14207 : * cdef int slice_memviewslice( # <<<<<<<<<<<<<<
14208 : * __Pyx_memviewslice *dst,
14209 : * Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset,
14210 : */
14211 :
14212 : /* function exit code */
14213 0 : __pyx_L1_error:;
14214 : #ifdef WITH_THREAD
14215 0 : __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
14216 : #endif
14217 0 : __Pyx_AddTraceback("View.MemoryView.slice_memviewslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
14218 0 : __pyx_r = -1;
14219 : #ifdef WITH_THREAD
14220 0 : __Pyx_PyGILState_Release(__pyx_gilstate_save);
14221 : #endif
14222 3504 : __pyx_L0:;
14223 3504 : return __pyx_r;
14224 : }
14225 :
14226 : /* "View.MemoryView":896
14227 : *
14228 : * @cname('__pyx_pybuffer_index')
14229 : * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index, # <<<<<<<<<<<<<<
14230 : * Py_ssize_t dim) except NULL:
14231 : * cdef Py_ssize_t shape, stride, suboffset = -1
14232 : */
14233 :
14234 0 : static char *__pyx_pybuffer_index(Py_buffer *__pyx_v_view, char *__pyx_v_bufp, Py_ssize_t __pyx_v_index, Py_ssize_t __pyx_v_dim) {
14235 0 : Py_ssize_t __pyx_v_shape;
14236 0 : Py_ssize_t __pyx_v_stride;
14237 0 : Py_ssize_t __pyx_v_suboffset;
14238 0 : Py_ssize_t __pyx_v_itemsize;
14239 0 : char *__pyx_v_resultp;
14240 0 : char *__pyx_r;
14241 : __Pyx_RefNannyDeclarations
14242 0 : Py_ssize_t __pyx_t_1;
14243 0 : int __pyx_t_2;
14244 0 : PyObject *__pyx_t_3 = NULL;
14245 0 : Py_UCS4 __pyx_t_4;
14246 0 : PyObject *__pyx_t_5 = NULL;
14247 0 : int __pyx_lineno = 0;
14248 0 : const char *__pyx_filename = NULL;
14249 0 : int __pyx_clineno = 0;
14250 0 : __Pyx_RefNannySetupContext("pybuffer_index", 1);
14251 :
14252 : /* "View.MemoryView":898
14253 : * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index,
14254 : * Py_ssize_t dim) except NULL:
14255 : * cdef Py_ssize_t shape, stride, suboffset = -1 # <<<<<<<<<<<<<<
14256 : * cdef Py_ssize_t itemsize = view.itemsize
14257 : * cdef char *resultp
14258 : */
14259 0 : __pyx_v_suboffset = -1L;
14260 :
14261 : /* "View.MemoryView":899
14262 : * Py_ssize_t dim) except NULL:
14263 : * cdef Py_ssize_t shape, stride, suboffset = -1
14264 : * cdef Py_ssize_t itemsize = view.itemsize # <<<<<<<<<<<<<<
14265 : * cdef char *resultp
14266 : *
14267 : */
14268 0 : __pyx_t_1 = __pyx_v_view->itemsize;
14269 0 : __pyx_v_itemsize = __pyx_t_1;
14270 :
14271 : /* "View.MemoryView":902
14272 : * cdef char *resultp
14273 : *
14274 : * if view.ndim == 0: # <<<<<<<<<<<<<<
14275 : * shape = view.len // itemsize
14276 : * stride = itemsize
14277 : */
14278 0 : __pyx_t_2 = (__pyx_v_view->ndim == 0);
14279 0 : if (__pyx_t_2) {
14280 :
14281 : /* "View.MemoryView":903
14282 : *
14283 : * if view.ndim == 0:
14284 : * shape = view.len // itemsize # <<<<<<<<<<<<<<
14285 : * stride = itemsize
14286 : * else:
14287 : */
14288 0 : if (unlikely(__pyx_v_itemsize == 0)) {
14289 0 : PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
14290 0 : __PYX_ERR(1, 903, __pyx_L1_error)
14291 : }
14292 0 : else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_itemsize == (Py_ssize_t)-1) && unlikely(__Pyx_UNARY_NEG_WOULD_OVERFLOW(__pyx_v_view->len))) {
14293 0 : PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
14294 0 : __PYX_ERR(1, 903, __pyx_L1_error)
14295 : }
14296 0 : __pyx_v_shape = __Pyx_div_Py_ssize_t(__pyx_v_view->len, __pyx_v_itemsize);
14297 :
14298 : /* "View.MemoryView":904
14299 : * if view.ndim == 0:
14300 : * shape = view.len // itemsize
14301 : * stride = itemsize # <<<<<<<<<<<<<<
14302 : * else:
14303 : * shape = view.shape[dim]
14304 : */
14305 0 : __pyx_v_stride = __pyx_v_itemsize;
14306 :
14307 : /* "View.MemoryView":902
14308 : * cdef char *resultp
14309 : *
14310 : * if view.ndim == 0: # <<<<<<<<<<<<<<
14311 : * shape = view.len // itemsize
14312 : * stride = itemsize
14313 : */
14314 0 : goto __pyx_L3;
14315 : }
14316 :
14317 : /* "View.MemoryView":906
14318 : * stride = itemsize
14319 : * else:
14320 : * shape = view.shape[dim] # <<<<<<<<<<<<<<
14321 : * stride = view.strides[dim]
14322 : * if view.suboffsets != NULL:
14323 : */
14324 : /*else*/ {
14325 0 : __pyx_v_shape = (__pyx_v_view->shape[__pyx_v_dim]);
14326 :
14327 : /* "View.MemoryView":907
14328 : * else:
14329 : * shape = view.shape[dim]
14330 : * stride = view.strides[dim] # <<<<<<<<<<<<<<
14331 : * if view.suboffsets != NULL:
14332 : * suboffset = view.suboffsets[dim]
14333 : */
14334 0 : __pyx_v_stride = (__pyx_v_view->strides[__pyx_v_dim]);
14335 :
14336 : /* "View.MemoryView":908
14337 : * shape = view.shape[dim]
14338 : * stride = view.strides[dim]
14339 : * if view.suboffsets != NULL: # <<<<<<<<<<<<<<
14340 : * suboffset = view.suboffsets[dim]
14341 : *
14342 : */
14343 0 : __pyx_t_2 = (__pyx_v_view->suboffsets != NULL);
14344 0 : if (__pyx_t_2) {
14345 :
14346 : /* "View.MemoryView":909
14347 : * stride = view.strides[dim]
14348 : * if view.suboffsets != NULL:
14349 : * suboffset = view.suboffsets[dim] # <<<<<<<<<<<<<<
14350 : *
14351 : * if index < 0:
14352 : */
14353 0 : __pyx_v_suboffset = (__pyx_v_view->suboffsets[__pyx_v_dim]);
14354 :
14355 : /* "View.MemoryView":908
14356 : * shape = view.shape[dim]
14357 : * stride = view.strides[dim]
14358 : * if view.suboffsets != NULL: # <<<<<<<<<<<<<<
14359 : * suboffset = view.suboffsets[dim]
14360 : *
14361 : */
14362 : }
14363 : }
14364 0 : __pyx_L3:;
14365 :
14366 : /* "View.MemoryView":911
14367 : * suboffset = view.suboffsets[dim]
14368 : *
14369 : * if index < 0: # <<<<<<<<<<<<<<
14370 : * index += view.shape[dim]
14371 : * if index < 0:
14372 : */
14373 0 : __pyx_t_2 = (__pyx_v_index < 0);
14374 0 : if (__pyx_t_2) {
14375 :
14376 : /* "View.MemoryView":912
14377 : *
14378 : * if index < 0:
14379 : * index += view.shape[dim] # <<<<<<<<<<<<<<
14380 : * if index < 0:
14381 : * raise IndexError, f"Out of bounds on buffer access (axis {dim})"
14382 : */
14383 0 : __pyx_v_index = (__pyx_v_index + (__pyx_v_view->shape[__pyx_v_dim]));
14384 :
14385 : /* "View.MemoryView":913
14386 : * if index < 0:
14387 : * index += view.shape[dim]
14388 : * if index < 0: # <<<<<<<<<<<<<<
14389 : * raise IndexError, f"Out of bounds on buffer access (axis {dim})"
14390 : *
14391 : */
14392 0 : __pyx_t_2 = (__pyx_v_index < 0);
14393 0 : if (unlikely(__pyx_t_2)) {
14394 :
14395 : /* "View.MemoryView":914
14396 : * index += view.shape[dim]
14397 : * if index < 0:
14398 : * raise IndexError, f"Out of bounds on buffer access (axis {dim})" # <<<<<<<<<<<<<<
14399 : *
14400 : * if index >= shape:
14401 : */
14402 0 : __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 914, __pyx_L1_error)
14403 0 : __Pyx_GOTREF(__pyx_t_3);
14404 0 : __pyx_t_1 = 0;
14405 0 : __pyx_t_4 = 127;
14406 0 : __Pyx_INCREF(__pyx_kp_u_Out_of_bounds_on_buffer_access_a);
14407 0 : __pyx_t_1 += 37;
14408 0 : __Pyx_GIVEREF(__pyx_kp_u_Out_of_bounds_on_buffer_access_a);
14409 0 : PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Out_of_bounds_on_buffer_access_a);
14410 0 : __pyx_t_5 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_dim, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 914, __pyx_L1_error)
14411 0 : __Pyx_GOTREF(__pyx_t_5);
14412 0 : __pyx_t_1 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
14413 0 : __Pyx_GIVEREF(__pyx_t_5);
14414 0 : PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5);
14415 0 : __pyx_t_5 = 0;
14416 0 : __Pyx_INCREF(__pyx_kp_u__7);
14417 0 : __pyx_t_1 += 1;
14418 0 : __Pyx_GIVEREF(__pyx_kp_u__7);
14419 0 : PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u__7);
14420 0 : __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 914, __pyx_L1_error)
14421 0 : __Pyx_GOTREF(__pyx_t_5);
14422 0 : __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14423 0 : __Pyx_Raise(__pyx_builtin_IndexError, __pyx_t_5, 0, 0);
14424 0 : __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14425 0 : __PYX_ERR(1, 914, __pyx_L1_error)
14426 :
14427 : /* "View.MemoryView":913
14428 : * if index < 0:
14429 : * index += view.shape[dim]
14430 : * if index < 0: # <<<<<<<<<<<<<<
14431 : * raise IndexError, f"Out of bounds on buffer access (axis {dim})"
14432 : *
14433 : */
14434 : }
14435 :
14436 : /* "View.MemoryView":911
14437 : * suboffset = view.suboffsets[dim]
14438 : *
14439 : * if index < 0: # <<<<<<<<<<<<<<
14440 : * index += view.shape[dim]
14441 : * if index < 0:
14442 : */
14443 : }
14444 :
14445 : /* "View.MemoryView":916
14446 : * raise IndexError, f"Out of bounds on buffer access (axis {dim})"
14447 : *
14448 : * if index >= shape: # <<<<<<<<<<<<<<
14449 : * raise IndexError, f"Out of bounds on buffer access (axis {dim})"
14450 : *
14451 : */
14452 0 : __pyx_t_2 = (__pyx_v_index >= __pyx_v_shape);
14453 0 : if (unlikely(__pyx_t_2)) {
14454 :
14455 : /* "View.MemoryView":917
14456 : *
14457 : * if index >= shape:
14458 : * raise IndexError, f"Out of bounds on buffer access (axis {dim})" # <<<<<<<<<<<<<<
14459 : *
14460 : * resultp = bufp + index * stride
14461 : */
14462 0 : __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 917, __pyx_L1_error)
14463 0 : __Pyx_GOTREF(__pyx_t_5);
14464 0 : __pyx_t_1 = 0;
14465 0 : __pyx_t_4 = 127;
14466 0 : __Pyx_INCREF(__pyx_kp_u_Out_of_bounds_on_buffer_access_a);
14467 0 : __pyx_t_1 += 37;
14468 0 : __Pyx_GIVEREF(__pyx_kp_u_Out_of_bounds_on_buffer_access_a);
14469 0 : PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_Out_of_bounds_on_buffer_access_a);
14470 0 : __pyx_t_3 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_dim, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 917, __pyx_L1_error)
14471 0 : __Pyx_GOTREF(__pyx_t_3);
14472 0 : __pyx_t_1 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
14473 0 : __Pyx_GIVEREF(__pyx_t_3);
14474 0 : PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
14475 0 : __pyx_t_3 = 0;
14476 0 : __Pyx_INCREF(__pyx_kp_u__7);
14477 0 : __pyx_t_1 += 1;
14478 0 : __Pyx_GIVEREF(__pyx_kp_u__7);
14479 0 : PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u__7);
14480 0 : __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_5, 3, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 917, __pyx_L1_error)
14481 0 : __Pyx_GOTREF(__pyx_t_3);
14482 0 : __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14483 0 : __Pyx_Raise(__pyx_builtin_IndexError, __pyx_t_3, 0, 0);
14484 0 : __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14485 0 : __PYX_ERR(1, 917, __pyx_L1_error)
14486 :
14487 : /* "View.MemoryView":916
14488 : * raise IndexError, f"Out of bounds on buffer access (axis {dim})"
14489 : *
14490 : * if index >= shape: # <<<<<<<<<<<<<<
14491 : * raise IndexError, f"Out of bounds on buffer access (axis {dim})"
14492 : *
14493 : */
14494 : }
14495 :
14496 : /* "View.MemoryView":919
14497 : * raise IndexError, f"Out of bounds on buffer access (axis {dim})"
14498 : *
14499 : * resultp = bufp + index * stride # <<<<<<<<<<<<<<
14500 : * if suboffset >= 0:
14501 : * resultp = (<char **> resultp)[0] + suboffset
14502 : */
14503 0 : __pyx_v_resultp = (__pyx_v_bufp + (__pyx_v_index * __pyx_v_stride));
14504 :
14505 : /* "View.MemoryView":920
14506 : *
14507 : * resultp = bufp + index * stride
14508 : * if suboffset >= 0: # <<<<<<<<<<<<<<
14509 : * resultp = (<char **> resultp)[0] + suboffset
14510 : *
14511 : */
14512 0 : __pyx_t_2 = (__pyx_v_suboffset >= 0);
14513 0 : if (__pyx_t_2) {
14514 :
14515 : /* "View.MemoryView":921
14516 : * resultp = bufp + index * stride
14517 : * if suboffset >= 0:
14518 : * resultp = (<char **> resultp)[0] + suboffset # <<<<<<<<<<<<<<
14519 : *
14520 : * return resultp
14521 : */
14522 0 : __pyx_v_resultp = ((((char **)__pyx_v_resultp)[0]) + __pyx_v_suboffset);
14523 :
14524 : /* "View.MemoryView":920
14525 : *
14526 : * resultp = bufp + index * stride
14527 : * if suboffset >= 0: # <<<<<<<<<<<<<<
14528 : * resultp = (<char **> resultp)[0] + suboffset
14529 : *
14530 : */
14531 : }
14532 :
14533 : /* "View.MemoryView":923
14534 : * resultp = (<char **> resultp)[0] + suboffset
14535 : *
14536 : * return resultp # <<<<<<<<<<<<<<
14537 : *
14538 : *
14539 : */
14540 0 : __pyx_r = __pyx_v_resultp;
14541 0 : goto __pyx_L0;
14542 :
14543 : /* "View.MemoryView":896
14544 : *
14545 : * @cname('__pyx_pybuffer_index')
14546 : * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index, # <<<<<<<<<<<<<<
14547 : * Py_ssize_t dim) except NULL:
14548 : * cdef Py_ssize_t shape, stride, suboffset = -1
14549 : */
14550 :
14551 : /* function exit code */
14552 0 : __pyx_L1_error:;
14553 0 : __Pyx_XDECREF(__pyx_t_3);
14554 0 : __Pyx_XDECREF(__pyx_t_5);
14555 0 : __Pyx_AddTraceback("View.MemoryView.pybuffer_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
14556 0 : __pyx_r = NULL;
14557 0 : __pyx_L0:;
14558 0 : __Pyx_RefNannyFinishContext();
14559 0 : return __pyx_r;
14560 : }
14561 :
14562 : /* "View.MemoryView":929
14563 : *
14564 : * @cname('__pyx_memslice_transpose')
14565 : * cdef int transpose_memslice(__Pyx_memviewslice *memslice) except -1 nogil: # <<<<<<<<<<<<<<
14566 : * cdef int ndim = memslice.memview.view.ndim
14567 : *
14568 : */
14569 :
14570 0 : static int __pyx_memslice_transpose(__Pyx_memviewslice *__pyx_v_memslice) {
14571 0 : int __pyx_v_ndim;
14572 0 : Py_ssize_t *__pyx_v_shape;
14573 0 : Py_ssize_t *__pyx_v_strides;
14574 0 : int __pyx_v_i;
14575 0 : int __pyx_v_j;
14576 0 : int __pyx_r;
14577 0 : int __pyx_t_1;
14578 0 : Py_ssize_t *__pyx_t_2;
14579 0 : long __pyx_t_3;
14580 0 : long __pyx_t_4;
14581 0 : Py_ssize_t __pyx_t_5;
14582 0 : Py_ssize_t __pyx_t_6;
14583 0 : int __pyx_t_7;
14584 0 : int __pyx_t_8;
14585 0 : int __pyx_t_9;
14586 0 : int __pyx_lineno = 0;
14587 0 : const char *__pyx_filename = NULL;
14588 0 : int __pyx_clineno = 0;
14589 : #ifdef WITH_THREAD
14590 0 : PyGILState_STATE __pyx_gilstate_save;
14591 : #endif
14592 :
14593 : /* "View.MemoryView":930
14594 : * @cname('__pyx_memslice_transpose')
14595 : * cdef int transpose_memslice(__Pyx_memviewslice *memslice) except -1 nogil:
14596 : * cdef int ndim = memslice.memview.view.ndim # <<<<<<<<<<<<<<
14597 : *
14598 : * cdef Py_ssize_t *shape = memslice.shape
14599 : */
14600 0 : __pyx_t_1 = __pyx_v_memslice->memview->view.ndim;
14601 0 : __pyx_v_ndim = __pyx_t_1;
14602 :
14603 : /* "View.MemoryView":932
14604 : * cdef int ndim = memslice.memview.view.ndim
14605 : *
14606 : * cdef Py_ssize_t *shape = memslice.shape # <<<<<<<<<<<<<<
14607 : * cdef Py_ssize_t *strides = memslice.strides
14608 : *
14609 : */
14610 0 : __pyx_t_2 = __pyx_v_memslice->shape;
14611 0 : __pyx_v_shape = __pyx_t_2;
14612 :
14613 : /* "View.MemoryView":933
14614 : *
14615 : * cdef Py_ssize_t *shape = memslice.shape
14616 : * cdef Py_ssize_t *strides = memslice.strides # <<<<<<<<<<<<<<
14617 : *
14618 : *
14619 : */
14620 0 : __pyx_t_2 = __pyx_v_memslice->strides;
14621 0 : __pyx_v_strides = __pyx_t_2;
14622 :
14623 : /* "View.MemoryView":937
14624 : *
14625 : * cdef int i, j
14626 : * for i in range(ndim // 2): # <<<<<<<<<<<<<<
14627 : * j = ndim - 1 - i
14628 : * strides[i], strides[j] = strides[j], strides[i]
14629 : */
14630 0 : __pyx_t_3 = __Pyx_div_long(__pyx_v_ndim, 2);
14631 0 : __pyx_t_4 = __pyx_t_3;
14632 0 : for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_4; __pyx_t_1+=1) {
14633 0 : __pyx_v_i = __pyx_t_1;
14634 :
14635 : /* "View.MemoryView":938
14636 : * cdef int i, j
14637 : * for i in range(ndim // 2):
14638 : * j = ndim - 1 - i # <<<<<<<<<<<<<<
14639 : * strides[i], strides[j] = strides[j], strides[i]
14640 : * shape[i], shape[j] = shape[j], shape[i]
14641 : */
14642 0 : __pyx_v_j = ((__pyx_v_ndim - 1) - __pyx_v_i);
14643 :
14644 : /* "View.MemoryView":939
14645 : * for i in range(ndim // 2):
14646 : * j = ndim - 1 - i
14647 : * strides[i], strides[j] = strides[j], strides[i] # <<<<<<<<<<<<<<
14648 : * shape[i], shape[j] = shape[j], shape[i]
14649 : *
14650 : */
14651 0 : __pyx_t_5 = (__pyx_v_strides[__pyx_v_j]);
14652 0 : __pyx_t_6 = (__pyx_v_strides[__pyx_v_i]);
14653 0 : (__pyx_v_strides[__pyx_v_i]) = __pyx_t_5;
14654 0 : (__pyx_v_strides[__pyx_v_j]) = __pyx_t_6;
14655 :
14656 : /* "View.MemoryView":940
14657 : * j = ndim - 1 - i
14658 : * strides[i], strides[j] = strides[j], strides[i]
14659 : * shape[i], shape[j] = shape[j], shape[i] # <<<<<<<<<<<<<<
14660 : *
14661 : * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:
14662 : */
14663 0 : __pyx_t_6 = (__pyx_v_shape[__pyx_v_j]);
14664 0 : __pyx_t_5 = (__pyx_v_shape[__pyx_v_i]);
14665 0 : (__pyx_v_shape[__pyx_v_i]) = __pyx_t_6;
14666 0 : (__pyx_v_shape[__pyx_v_j]) = __pyx_t_5;
14667 :
14668 : /* "View.MemoryView":942
14669 : * shape[i], shape[j] = shape[j], shape[i]
14670 : *
14671 : * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0: # <<<<<<<<<<<<<<
14672 : * _err(PyExc_ValueError, "Cannot transpose memoryview with indirect dimensions")
14673 : *
14674 : */
14675 0 : __pyx_t_8 = ((__pyx_v_memslice->suboffsets[__pyx_v_i]) >= 0);
14676 0 : if (!__pyx_t_8) {
14677 0 : } else {
14678 0 : __pyx_t_7 = __pyx_t_8;
14679 0 : goto __pyx_L6_bool_binop_done;
14680 : }
14681 0 : __pyx_t_8 = ((__pyx_v_memslice->suboffsets[__pyx_v_j]) >= 0);
14682 0 : __pyx_t_7 = __pyx_t_8;
14683 0 : __pyx_L6_bool_binop_done:;
14684 0 : if (__pyx_t_7) {
14685 :
14686 : /* "View.MemoryView":943
14687 : *
14688 : * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:
14689 : * _err(PyExc_ValueError, "Cannot transpose memoryview with indirect dimensions") # <<<<<<<<<<<<<<
14690 : *
14691 : * return 0
14692 : */
14693 0 : __pyx_t_9 = __pyx_memoryview_err(PyExc_ValueError, __pyx_kp_s_Cannot_transpose_memoryview_with); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 943, __pyx_L1_error)
14694 :
14695 : /* "View.MemoryView":942
14696 : * shape[i], shape[j] = shape[j], shape[i]
14697 : *
14698 : * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0: # <<<<<<<<<<<<<<
14699 : * _err(PyExc_ValueError, "Cannot transpose memoryview with indirect dimensions")
14700 : *
14701 : */
14702 : }
14703 : }
14704 :
14705 : /* "View.MemoryView":945
14706 : * _err(PyExc_ValueError, "Cannot transpose memoryview with indirect dimensions")
14707 : *
14708 : * return 0 # <<<<<<<<<<<<<<
14709 : *
14710 : *
14711 : */
14712 0 : __pyx_r = 0;
14713 0 : goto __pyx_L0;
14714 :
14715 : /* "View.MemoryView":929
14716 : *
14717 : * @cname('__pyx_memslice_transpose')
14718 : * cdef int transpose_memslice(__Pyx_memviewslice *memslice) except -1 nogil: # <<<<<<<<<<<<<<
14719 : * cdef int ndim = memslice.memview.view.ndim
14720 : *
14721 : */
14722 :
14723 : /* function exit code */
14724 0 : __pyx_L1_error:;
14725 : #ifdef WITH_THREAD
14726 0 : __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
14727 : #endif
14728 0 : __Pyx_AddTraceback("View.MemoryView.transpose_memslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
14729 0 : __pyx_r = -1;
14730 : #ifdef WITH_THREAD
14731 0 : __Pyx_PyGILState_Release(__pyx_gilstate_save);
14732 : #endif
14733 0 : __pyx_L0:;
14734 0 : return __pyx_r;
14735 : }
14736 :
14737 : /* "View.MemoryView":963
14738 : * cdef int (*to_dtype_func)(char *, object) except 0
14739 : *
14740 : * def __dealloc__(self): # <<<<<<<<<<<<<<
14741 : * __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1)
14742 : *
14743 : */
14744 :
14745 : /* Python wrapper */
14746 : static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self); /*proto*/
14747 0 : static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self) {
14748 0 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
14749 : __Pyx_RefNannyDeclarations
14750 0 : __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
14751 0 : __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
14752 0 : __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));
14753 :
14754 : /* function exit code */
14755 0 : __Pyx_RefNannyFinishContext();
14756 : }
14757 :
14758 0 : static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self) {
14759 :
14760 : /* "View.MemoryView":964
14761 : *
14762 : * def __dealloc__(self):
14763 : * __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1) # <<<<<<<<<<<<<<
14764 : *
14765 : * cdef convert_item_to_object(self, char *itemp):
14766 : */
14767 0 : __PYX_XCLEAR_MEMVIEW((&__pyx_v_self->from_slice), 1);
14768 :
14769 : /* "View.MemoryView":963
14770 : * cdef int (*to_dtype_func)(char *, object) except 0
14771 : *
14772 : * def __dealloc__(self): # <<<<<<<<<<<<<<
14773 : * __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1)
14774 : *
14775 : */
14776 :
14777 : /* function exit code */
14778 : }
14779 :
14780 : /* "View.MemoryView":966
14781 : * __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1)
14782 : *
14783 : * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<<
14784 : * if self.to_object_func != NULL:
14785 : * return self.to_object_func(itemp)
14786 : */
14787 :
14788 0 : static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp) {
14789 0 : PyObject *__pyx_r = NULL;
14790 : __Pyx_RefNannyDeclarations
14791 0 : int __pyx_t_1;
14792 0 : PyObject *__pyx_t_2 = NULL;
14793 0 : int __pyx_lineno = 0;
14794 0 : const char *__pyx_filename = NULL;
14795 0 : int __pyx_clineno = 0;
14796 0 : __Pyx_RefNannySetupContext("convert_item_to_object", 1);
14797 :
14798 : /* "View.MemoryView":967
14799 : *
14800 : * cdef convert_item_to_object(self, char *itemp):
14801 : * if self.to_object_func != NULL: # <<<<<<<<<<<<<<
14802 : * return self.to_object_func(itemp)
14803 : * else:
14804 : */
14805 0 : __pyx_t_1 = (__pyx_v_self->to_object_func != NULL);
14806 0 : if (__pyx_t_1) {
14807 :
14808 : /* "View.MemoryView":968
14809 : * cdef convert_item_to_object(self, char *itemp):
14810 : * if self.to_object_func != NULL:
14811 : * return self.to_object_func(itemp) # <<<<<<<<<<<<<<
14812 : * else:
14813 : * return memoryview.convert_item_to_object(self, itemp)
14814 : */
14815 0 : __Pyx_XDECREF(__pyx_r);
14816 0 : __pyx_t_2 = __pyx_v_self->to_object_func(__pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 968, __pyx_L1_error)
14817 0 : __Pyx_GOTREF(__pyx_t_2);
14818 0 : __pyx_r = __pyx_t_2;
14819 0 : __pyx_t_2 = 0;
14820 0 : goto __pyx_L0;
14821 :
14822 : /* "View.MemoryView":967
14823 : *
14824 : * cdef convert_item_to_object(self, char *itemp):
14825 : * if self.to_object_func != NULL: # <<<<<<<<<<<<<<
14826 : * return self.to_object_func(itemp)
14827 : * else:
14828 : */
14829 : }
14830 :
14831 : /* "View.MemoryView":970
14832 : * return self.to_object_func(itemp)
14833 : * else:
14834 : * return memoryview.convert_item_to_object(self, itemp) # <<<<<<<<<<<<<<
14835 : *
14836 : * cdef assign_item_from_object(self, char *itemp, object value):
14837 : */
14838 : /*else*/ {
14839 0 : __Pyx_XDECREF(__pyx_r);
14840 0 : __pyx_t_2 = __pyx_memoryview_convert_item_to_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 970, __pyx_L1_error)
14841 0 : __Pyx_GOTREF(__pyx_t_2);
14842 0 : __pyx_r = __pyx_t_2;
14843 0 : __pyx_t_2 = 0;
14844 0 : goto __pyx_L0;
14845 : }
14846 :
14847 : /* "View.MemoryView":966
14848 : * __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1)
14849 : *
14850 : * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<<
14851 : * if self.to_object_func != NULL:
14852 : * return self.to_object_func(itemp)
14853 : */
14854 :
14855 : /* function exit code */
14856 0 : __pyx_L1_error:;
14857 0 : __Pyx_XDECREF(__pyx_t_2);
14858 0 : __Pyx_AddTraceback("View.MemoryView._memoryviewslice.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
14859 0 : __pyx_r = 0;
14860 0 : __pyx_L0:;
14861 0 : __Pyx_XGIVEREF(__pyx_r);
14862 0 : __Pyx_RefNannyFinishContext();
14863 0 : return __pyx_r;
14864 : }
14865 :
14866 : /* "View.MemoryView":972
14867 : * return memoryview.convert_item_to_object(self, itemp)
14868 : *
14869 : * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<<
14870 : * if self.to_dtype_func != NULL:
14871 : * self.to_dtype_func(itemp, value)
14872 : */
14873 :
14874 0 : static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) {
14875 0 : PyObject *__pyx_r = NULL;
14876 : __Pyx_RefNannyDeclarations
14877 0 : int __pyx_t_1;
14878 0 : int __pyx_t_2;
14879 0 : PyObject *__pyx_t_3 = NULL;
14880 0 : int __pyx_lineno = 0;
14881 0 : const char *__pyx_filename = NULL;
14882 0 : int __pyx_clineno = 0;
14883 0 : __Pyx_RefNannySetupContext("assign_item_from_object", 1);
14884 :
14885 : /* "View.MemoryView":973
14886 : *
14887 : * cdef assign_item_from_object(self, char *itemp, object value):
14888 : * if self.to_dtype_func != NULL: # <<<<<<<<<<<<<<
14889 : * self.to_dtype_func(itemp, value)
14890 : * else:
14891 : */
14892 0 : __pyx_t_1 = (__pyx_v_self->to_dtype_func != NULL);
14893 0 : if (__pyx_t_1) {
14894 :
14895 : /* "View.MemoryView":974
14896 : * cdef assign_item_from_object(self, char *itemp, object value):
14897 : * if self.to_dtype_func != NULL:
14898 : * self.to_dtype_func(itemp, value) # <<<<<<<<<<<<<<
14899 : * else:
14900 : * memoryview.assign_item_from_object(self, itemp, value)
14901 : */
14902 0 : __pyx_t_2 = __pyx_v_self->to_dtype_func(__pyx_v_itemp, __pyx_v_value); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(1, 974, __pyx_L1_error)
14903 :
14904 : /* "View.MemoryView":973
14905 : *
14906 : * cdef assign_item_from_object(self, char *itemp, object value):
14907 : * if self.to_dtype_func != NULL: # <<<<<<<<<<<<<<
14908 : * self.to_dtype_func(itemp, value)
14909 : * else:
14910 : */
14911 0 : goto __pyx_L3;
14912 : }
14913 :
14914 : /* "View.MemoryView":976
14915 : * self.to_dtype_func(itemp, value)
14916 : * else:
14917 : * memoryview.assign_item_from_object(self, itemp, value) # <<<<<<<<<<<<<<
14918 : *
14919 : * cdef _get_base(self):
14920 : */
14921 : /*else*/ {
14922 0 : __pyx_t_3 = __pyx_memoryview_assign_item_from_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 976, __pyx_L1_error)
14923 0 : __Pyx_GOTREF(__pyx_t_3);
14924 0 : __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14925 : }
14926 0 : __pyx_L3:;
14927 :
14928 : /* "View.MemoryView":972
14929 : * return memoryview.convert_item_to_object(self, itemp)
14930 : *
14931 : * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<<
14932 : * if self.to_dtype_func != NULL:
14933 : * self.to_dtype_func(itemp, value)
14934 : */
14935 :
14936 : /* function exit code */
14937 0 : __pyx_r = Py_None; __Pyx_INCREF(Py_None);
14938 0 : goto __pyx_L0;
14939 0 : __pyx_L1_error:;
14940 0 : __Pyx_XDECREF(__pyx_t_3);
14941 0 : __Pyx_AddTraceback("View.MemoryView._memoryviewslice.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
14942 0 : __pyx_r = 0;
14943 0 : __pyx_L0:;
14944 0 : __Pyx_XGIVEREF(__pyx_r);
14945 0 : __Pyx_RefNannyFinishContext();
14946 0 : return __pyx_r;
14947 : }
14948 :
14949 : /* "View.MemoryView":978
14950 : * memoryview.assign_item_from_object(self, itemp, value)
14951 : *
14952 : * cdef _get_base(self): # <<<<<<<<<<<<<<
14953 : * return self.from_object
14954 : *
14955 : */
14956 :
14957 0 : static PyObject *__pyx_memoryviewslice__get_base(struct __pyx_memoryviewslice_obj *__pyx_v_self) {
14958 0 : PyObject *__pyx_r = NULL;
14959 : __Pyx_RefNannyDeclarations
14960 0 : __Pyx_RefNannySetupContext("_get_base", 1);
14961 :
14962 : /* "View.MemoryView":979
14963 : *
14964 : * cdef _get_base(self):
14965 : * return self.from_object # <<<<<<<<<<<<<<
14966 : *
14967 : *
14968 : */
14969 0 : __Pyx_XDECREF(__pyx_r);
14970 0 : __Pyx_INCREF(__pyx_v_self->from_object);
14971 0 : __pyx_r = __pyx_v_self->from_object;
14972 0 : goto __pyx_L0;
14973 :
14974 : /* "View.MemoryView":978
14975 : * memoryview.assign_item_from_object(self, itemp, value)
14976 : *
14977 : * cdef _get_base(self): # <<<<<<<<<<<<<<
14978 : * return self.from_object
14979 : *
14980 : */
14981 :
14982 : /* function exit code */
14983 0 : __pyx_L0:;
14984 0 : __Pyx_XGIVEREF(__pyx_r);
14985 0 : __Pyx_RefNannyFinishContext();
14986 0 : return __pyx_r;
14987 : }
14988 :
14989 : /* "(tree fragment)":1
14990 : * def __reduce_cython__(self): # <<<<<<<<<<<<<<
14991 : * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
14992 : * def __setstate_cython__(self, __pyx_state):
14993 : */
14994 :
14995 : /* Python wrapper */
14996 : static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self,
14997 : #if CYTHON_METH_FASTCALL
14998 : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
14999 : #else
15000 : PyObject *__pyx_args, PyObject *__pyx_kwds
15001 : #endif
15002 : ); /*proto*/
15003 0 : static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self,
15004 : #if CYTHON_METH_FASTCALL
15005 : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
15006 : #else
15007 : PyObject *__pyx_args, PyObject *__pyx_kwds
15008 : #endif
15009 : ) {
15010 : #if !CYTHON_METH_FASTCALL
15011 : CYTHON_UNUSED Py_ssize_t __pyx_nargs;
15012 : #endif
15013 0 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
15014 0 : PyObject *__pyx_r = 0;
15015 : __Pyx_RefNannyDeclarations
15016 0 : __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
15017 : #if !CYTHON_METH_FASTCALL
15018 : #if CYTHON_ASSUME_SAFE_MACROS
15019 : __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
15020 : #else
15021 : __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
15022 : #endif
15023 : #endif
15024 0 : __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
15025 0 : if (unlikely(__pyx_nargs > 0)) {
15026 0 : __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
15027 0 : if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
15028 0 : __pyx_r = __pyx_pf___pyx_memoryviewslice___reduce_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));
15029 :
15030 : /* function exit code */
15031 0 : __Pyx_RefNannyFinishContext();
15032 0 : return __pyx_r;
15033 : }
15034 :
15035 0 : static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self) {
15036 0 : PyObject *__pyx_r = NULL;
15037 : __Pyx_RefNannyDeclarations
15038 0 : int __pyx_lineno = 0;
15039 0 : const char *__pyx_filename = NULL;
15040 0 : int __pyx_clineno = 0;
15041 0 : __Pyx_RefNannySetupContext("__reduce_cython__", 1);
15042 :
15043 : /* "(tree fragment)":2
15044 : * def __reduce_cython__(self):
15045 : * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<<
15046 : * def __setstate_cython__(self, __pyx_state):
15047 : * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
15048 : */
15049 0 : __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
15050 0 : __PYX_ERR(1, 2, __pyx_L1_error)
15051 :
15052 : /* "(tree fragment)":1
15053 : * def __reduce_cython__(self): # <<<<<<<<<<<<<<
15054 : * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
15055 : * def __setstate_cython__(self, __pyx_state):
15056 : */
15057 :
15058 : /* function exit code */
15059 0 : __pyx_L1_error:;
15060 0 : __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
15061 0 : __pyx_r = NULL;
15062 0 : __Pyx_XGIVEREF(__pyx_r);
15063 0 : __Pyx_RefNannyFinishContext();
15064 0 : return __pyx_r;
15065 : }
15066 :
15067 : /* "(tree fragment)":3
15068 : * def __reduce_cython__(self):
15069 : * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
15070 : * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
15071 : * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
15072 : */
15073 :
15074 : /* Python wrapper */
15075 : static PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self,
15076 : #if CYTHON_METH_FASTCALL
15077 : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
15078 : #else
15079 : PyObject *__pyx_args, PyObject *__pyx_kwds
15080 : #endif
15081 : ); /*proto*/
15082 0 : static PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self,
15083 : #if CYTHON_METH_FASTCALL
15084 : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
15085 : #else
15086 : PyObject *__pyx_args, PyObject *__pyx_kwds
15087 : #endif
15088 : ) {
15089 0 : CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
15090 : #if !CYTHON_METH_FASTCALL
15091 : CYTHON_UNUSED Py_ssize_t __pyx_nargs;
15092 : #endif
15093 0 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
15094 0 : PyObject* values[1] = {0};
15095 0 : int __pyx_lineno = 0;
15096 0 : const char *__pyx_filename = NULL;
15097 0 : int __pyx_clineno = 0;
15098 0 : PyObject *__pyx_r = 0;
15099 : __Pyx_RefNannyDeclarations
15100 0 : __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
15101 : #if !CYTHON_METH_FASTCALL
15102 : #if CYTHON_ASSUME_SAFE_MACROS
15103 : __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
15104 : #else
15105 : __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
15106 : #endif
15107 : #endif
15108 0 : __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
15109 : {
15110 0 : PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
15111 0 : if (__pyx_kwds) {
15112 0 : Py_ssize_t kw_args;
15113 0 : switch (__pyx_nargs) {
15114 0 : case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
15115 0 : CYTHON_FALLTHROUGH;
15116 0 : case 0: break;
15117 0 : default: goto __pyx_L5_argtuple_error;
15118 : }
15119 0 : kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
15120 0 : switch (__pyx_nargs) {
15121 : case 0:
15122 0 : if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
15123 0 : (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
15124 0 : kw_args--;
15125 : }
15126 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
15127 0 : else goto __pyx_L5_argtuple_error;
15128 : }
15129 0 : if (unlikely(kw_args > 0)) {
15130 0 : const Py_ssize_t kwd_pos_args = __pyx_nargs;
15131 0 : if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
15132 : }
15133 0 : } else if (unlikely(__pyx_nargs != 1)) {
15134 0 : goto __pyx_L5_argtuple_error;
15135 : } else {
15136 0 : values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
15137 : }
15138 0 : __pyx_v___pyx_state = values[0];
15139 : }
15140 0 : goto __pyx_L6_skip;
15141 0 : __pyx_L5_argtuple_error:;
15142 0 : __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
15143 0 : __pyx_L6_skip:;
15144 0 : goto __pyx_L4_argument_unpacking_done;
15145 0 : __pyx_L3_error:;
15146 : {
15147 0 : Py_ssize_t __pyx_temp;
15148 0 : for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
15149 : __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
15150 : }
15151 : }
15152 0 : __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
15153 0 : __Pyx_RefNannyFinishContext();
15154 0 : return NULL;
15155 0 : __pyx_L4_argument_unpacking_done:;
15156 0 : __pyx_r = __pyx_pf___pyx_memoryviewslice_2__setstate_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self), __pyx_v___pyx_state);
15157 :
15158 : /* function exit code */
15159 : {
15160 0 : Py_ssize_t __pyx_temp;
15161 0 : for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
15162 : __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
15163 : }
15164 : }
15165 : __Pyx_RefNannyFinishContext();
15166 : return __pyx_r;
15167 : }
15168 :
15169 0 : static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
15170 0 : PyObject *__pyx_r = NULL;
15171 : __Pyx_RefNannyDeclarations
15172 0 : int __pyx_lineno = 0;
15173 0 : const char *__pyx_filename = NULL;
15174 0 : int __pyx_clineno = 0;
15175 0 : __Pyx_RefNannySetupContext("__setstate_cython__", 1);
15176 :
15177 : /* "(tree fragment)":4
15178 : * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
15179 : * def __setstate_cython__(self, __pyx_state):
15180 : * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<<
15181 : */
15182 0 : __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
15183 0 : __PYX_ERR(1, 4, __pyx_L1_error)
15184 :
15185 : /* "(tree fragment)":3
15186 : * def __reduce_cython__(self):
15187 : * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
15188 : * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
15189 : * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
15190 : */
15191 :
15192 : /* function exit code */
15193 0 : __pyx_L1_error:;
15194 0 : __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
15195 0 : __pyx_r = NULL;
15196 0 : __Pyx_XGIVEREF(__pyx_r);
15197 0 : __Pyx_RefNannyFinishContext();
15198 0 : return __pyx_r;
15199 : }
15200 :
15201 : /* "View.MemoryView":999
15202 : *
15203 : * @cname('__pyx_memoryview_fromslice')
15204 : * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice, # <<<<<<<<<<<<<<
15205 : * int ndim,
15206 : * object (*to_object_func)(char *),
15207 : */
15208 :
15209 0 : static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewslice, int __pyx_v_ndim, PyObject *(*__pyx_v_to_object_func)(char *), int (*__pyx_v_to_dtype_func)(char *, PyObject *), int __pyx_v_dtype_is_object) {
15210 0 : struct __pyx_memoryviewslice_obj *__pyx_v_result = 0;
15211 0 : Py_ssize_t __pyx_v_suboffset;
15212 0 : PyObject *__pyx_v_length = NULL;
15213 0 : PyObject *__pyx_r = NULL;
15214 : __Pyx_RefNannyDeclarations
15215 0 : int __pyx_t_1;
15216 0 : PyObject *__pyx_t_2 = NULL;
15217 0 : PyObject *__pyx_t_3 = NULL;
15218 0 : __Pyx_TypeInfo *__pyx_t_4;
15219 0 : Py_buffer __pyx_t_5;
15220 0 : Py_ssize_t *__pyx_t_6;
15221 0 : Py_ssize_t *__pyx_t_7;
15222 0 : Py_ssize_t *__pyx_t_8;
15223 0 : Py_ssize_t __pyx_t_9;
15224 0 : int __pyx_lineno = 0;
15225 0 : const char *__pyx_filename = NULL;
15226 0 : int __pyx_clineno = 0;
15227 0 : __Pyx_RefNannySetupContext("memoryview_fromslice", 1);
15228 :
15229 : /* "View.MemoryView":1007
15230 : * cdef _memoryviewslice result
15231 : *
15232 : * if <PyObject *> memviewslice.memview == Py_None: # <<<<<<<<<<<<<<
15233 : * return None
15234 : *
15235 : */
15236 0 : __pyx_t_1 = (((PyObject *)__pyx_v_memviewslice.memview) == Py_None);
15237 0 : if (__pyx_t_1) {
15238 :
15239 : /* "View.MemoryView":1008
15240 : *
15241 : * if <PyObject *> memviewslice.memview == Py_None:
15242 : * return None # <<<<<<<<<<<<<<
15243 : *
15244 : *
15245 : */
15246 0 : __Pyx_XDECREF(__pyx_r);
15247 0 : __pyx_r = Py_None; __Pyx_INCREF(Py_None);
15248 0 : goto __pyx_L0;
15249 :
15250 : /* "View.MemoryView":1007
15251 : * cdef _memoryviewslice result
15252 : *
15253 : * if <PyObject *> memviewslice.memview == Py_None: # <<<<<<<<<<<<<<
15254 : * return None
15255 : *
15256 : */
15257 : }
15258 :
15259 : /* "View.MemoryView":1013
15260 : *
15261 : *
15262 : * result = _memoryviewslice.__new__(_memoryviewslice, None, 0, dtype_is_object) # <<<<<<<<<<<<<<
15263 : *
15264 : * result.from_slice = memviewslice
15265 : */
15266 0 : __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1013, __pyx_L1_error)
15267 0 : __Pyx_GOTREF(__pyx_t_2);
15268 0 : __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1013, __pyx_L1_error)
15269 0 : __Pyx_GOTREF(__pyx_t_3);
15270 0 : __Pyx_INCREF(Py_None);
15271 0 : __Pyx_GIVEREF(Py_None);
15272 0 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, Py_None)) __PYX_ERR(1, 1013, __pyx_L1_error);
15273 0 : __Pyx_INCREF(__pyx_int_0);
15274 0 : __Pyx_GIVEREF(__pyx_int_0);
15275 0 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_0)) __PYX_ERR(1, 1013, __pyx_L1_error);
15276 0 : __Pyx_GIVEREF(__pyx_t_2);
15277 0 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2)) __PYX_ERR(1, 1013, __pyx_L1_error);
15278 0 : __pyx_t_2 = 0;
15279 0 : __pyx_t_2 = ((PyObject *)__pyx_tp_new__memoryviewslice(((PyTypeObject *)__pyx_memoryviewslice_type), __pyx_t_3, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1013, __pyx_L1_error)
15280 0 : __Pyx_GOTREF((PyObject *)__pyx_t_2);
15281 0 : __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15282 0 : __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2);
15283 0 : __pyx_t_2 = 0;
15284 :
15285 : /* "View.MemoryView":1015
15286 : * result = _memoryviewslice.__new__(_memoryviewslice, None, 0, dtype_is_object)
15287 : *
15288 : * result.from_slice = memviewslice # <<<<<<<<<<<<<<
15289 : * __PYX_INC_MEMVIEW(&memviewslice, 1)
15290 : *
15291 : */
15292 0 : __pyx_v_result->from_slice = __pyx_v_memviewslice;
15293 :
15294 : /* "View.MemoryView":1016
15295 : *
15296 : * result.from_slice = memviewslice
15297 : * __PYX_INC_MEMVIEW(&memviewslice, 1) # <<<<<<<<<<<<<<
15298 : *
15299 : * result.from_object = (<memoryview> memviewslice.memview)._get_base()
15300 : */
15301 0 : __PYX_INC_MEMVIEW((&__pyx_v_memviewslice), 1);
15302 :
15303 : /* "View.MemoryView":1018
15304 : * __PYX_INC_MEMVIEW(&memviewslice, 1)
15305 : *
15306 : * result.from_object = (<memoryview> memviewslice.memview)._get_base() # <<<<<<<<<<<<<<
15307 : * result.typeinfo = memviewslice.memview.typeinfo
15308 : *
15309 : */
15310 0 : __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)->__pyx_vtab)->_get_base(((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1018, __pyx_L1_error)
15311 0 : __Pyx_GOTREF(__pyx_t_2);
15312 0 : __Pyx_GIVEREF(__pyx_t_2);
15313 0 : __Pyx_GOTREF(__pyx_v_result->from_object);
15314 0 : __Pyx_DECREF(__pyx_v_result->from_object);
15315 0 : __pyx_v_result->from_object = __pyx_t_2;
15316 0 : __pyx_t_2 = 0;
15317 :
15318 : /* "View.MemoryView":1019
15319 : *
15320 : * result.from_object = (<memoryview> memviewslice.memview)._get_base()
15321 : * result.typeinfo = memviewslice.memview.typeinfo # <<<<<<<<<<<<<<
15322 : *
15323 : * result.view = memviewslice.memview.view
15324 : */
15325 0 : __pyx_t_4 = __pyx_v_memviewslice.memview->typeinfo;
15326 0 : __pyx_v_result->__pyx_base.typeinfo = __pyx_t_4;
15327 :
15328 : /* "View.MemoryView":1021
15329 : * result.typeinfo = memviewslice.memview.typeinfo
15330 : *
15331 : * result.view = memviewslice.memview.view # <<<<<<<<<<<<<<
15332 : * result.view.buf = <void *> memviewslice.data
15333 : * result.view.ndim = ndim
15334 : */
15335 0 : __pyx_t_5 = __pyx_v_memviewslice.memview->view;
15336 0 : __pyx_v_result->__pyx_base.view = __pyx_t_5;
15337 :
15338 : /* "View.MemoryView":1022
15339 : *
15340 : * result.view = memviewslice.memview.view
15341 : * result.view.buf = <void *> memviewslice.data # <<<<<<<<<<<<<<
15342 : * result.view.ndim = ndim
15343 : * (<__pyx_buffer *> &result.view).obj = Py_None
15344 : */
15345 0 : __pyx_v_result->__pyx_base.view.buf = ((void *)__pyx_v_memviewslice.data);
15346 :
15347 : /* "View.MemoryView":1023
15348 : * result.view = memviewslice.memview.view
15349 : * result.view.buf = <void *> memviewslice.data
15350 : * result.view.ndim = ndim # <<<<<<<<<<<<<<
15351 : * (<__pyx_buffer *> &result.view).obj = Py_None
15352 : * Py_INCREF(Py_None)
15353 : */
15354 0 : __pyx_v_result->__pyx_base.view.ndim = __pyx_v_ndim;
15355 :
15356 : /* "View.MemoryView":1024
15357 : * result.view.buf = <void *> memviewslice.data
15358 : * result.view.ndim = ndim
15359 : * (<__pyx_buffer *> &result.view).obj = Py_None # <<<<<<<<<<<<<<
15360 : * Py_INCREF(Py_None)
15361 : *
15362 : */
15363 0 : ((Py_buffer *)(&__pyx_v_result->__pyx_base.view))->obj = Py_None;
15364 :
15365 : /* "View.MemoryView":1025
15366 : * result.view.ndim = ndim
15367 : * (<__pyx_buffer *> &result.view).obj = Py_None
15368 : * Py_INCREF(Py_None) # <<<<<<<<<<<<<<
15369 : *
15370 : * if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:
15371 : */
15372 0 : Py_INCREF(Py_None);
15373 :
15374 : /* "View.MemoryView":1027
15375 : * Py_INCREF(Py_None)
15376 : *
15377 : * if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE: # <<<<<<<<<<<<<<
15378 : * result.flags = PyBUF_RECORDS
15379 : * else:
15380 : */
15381 0 : __pyx_t_1 = ((((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)->flags & PyBUF_WRITABLE) != 0);
15382 0 : if (__pyx_t_1) {
15383 :
15384 : /* "View.MemoryView":1028
15385 : *
15386 : * if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:
15387 : * result.flags = PyBUF_RECORDS # <<<<<<<<<<<<<<
15388 : * else:
15389 : * result.flags = PyBUF_RECORDS_RO
15390 : */
15391 0 : __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS;
15392 :
15393 : /* "View.MemoryView":1027
15394 : * Py_INCREF(Py_None)
15395 : *
15396 : * if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE: # <<<<<<<<<<<<<<
15397 : * result.flags = PyBUF_RECORDS
15398 : * else:
15399 : */
15400 0 : goto __pyx_L4;
15401 : }
15402 :
15403 : /* "View.MemoryView":1030
15404 : * result.flags = PyBUF_RECORDS
15405 : * else:
15406 : * result.flags = PyBUF_RECORDS_RO # <<<<<<<<<<<<<<
15407 : *
15408 : * result.view.shape = <Py_ssize_t *> result.from_slice.shape
15409 : */
15410 : /*else*/ {
15411 0 : __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS_RO;
15412 : }
15413 0 : __pyx_L4:;
15414 :
15415 : /* "View.MemoryView":1032
15416 : * result.flags = PyBUF_RECORDS_RO
15417 : *
15418 : * result.view.shape = <Py_ssize_t *> result.from_slice.shape # <<<<<<<<<<<<<<
15419 : * result.view.strides = <Py_ssize_t *> result.from_slice.strides
15420 : *
15421 : */
15422 0 : __pyx_v_result->__pyx_base.view.shape = ((Py_ssize_t *)__pyx_v_result->from_slice.shape);
15423 :
15424 : /* "View.MemoryView":1033
15425 : *
15426 : * result.view.shape = <Py_ssize_t *> result.from_slice.shape
15427 : * result.view.strides = <Py_ssize_t *> result.from_slice.strides # <<<<<<<<<<<<<<
15428 : *
15429 : *
15430 : */
15431 0 : __pyx_v_result->__pyx_base.view.strides = ((Py_ssize_t *)__pyx_v_result->from_slice.strides);
15432 :
15433 : /* "View.MemoryView":1036
15434 : *
15435 : *
15436 : * result.view.suboffsets = NULL # <<<<<<<<<<<<<<
15437 : * for suboffset in result.from_slice.suboffsets[:ndim]:
15438 : * if suboffset >= 0:
15439 : */
15440 0 : __pyx_v_result->__pyx_base.view.suboffsets = NULL;
15441 :
15442 : /* "View.MemoryView":1037
15443 : *
15444 : * result.view.suboffsets = NULL
15445 : * for suboffset in result.from_slice.suboffsets[:ndim]: # <<<<<<<<<<<<<<
15446 : * if suboffset >= 0:
15447 : * result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
15448 : */
15449 0 : __pyx_t_7 = (__pyx_v_result->from_slice.suboffsets + __pyx_v_ndim);
15450 0 : for (__pyx_t_8 = __pyx_v_result->from_slice.suboffsets; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) {
15451 0 : __pyx_t_6 = __pyx_t_8;
15452 0 : __pyx_v_suboffset = (__pyx_t_6[0]);
15453 :
15454 : /* "View.MemoryView":1038
15455 : * result.view.suboffsets = NULL
15456 : * for suboffset in result.from_slice.suboffsets[:ndim]:
15457 : * if suboffset >= 0: # <<<<<<<<<<<<<<
15458 : * result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
15459 : * break
15460 : */
15461 0 : __pyx_t_1 = (__pyx_v_suboffset >= 0);
15462 0 : if (__pyx_t_1) {
15463 :
15464 : /* "View.MemoryView":1039
15465 : * for suboffset in result.from_slice.suboffsets[:ndim]:
15466 : * if suboffset >= 0:
15467 : * result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets # <<<<<<<<<<<<<<
15468 : * break
15469 : *
15470 : */
15471 0 : __pyx_v_result->__pyx_base.view.suboffsets = ((Py_ssize_t *)__pyx_v_result->from_slice.suboffsets);
15472 :
15473 : /* "View.MemoryView":1040
15474 : * if suboffset >= 0:
15475 : * result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
15476 : * break # <<<<<<<<<<<<<<
15477 : *
15478 : * result.view.len = result.view.itemsize
15479 : */
15480 0 : goto __pyx_L6_break;
15481 :
15482 : /* "View.MemoryView":1038
15483 : * result.view.suboffsets = NULL
15484 : * for suboffset in result.from_slice.suboffsets[:ndim]:
15485 : * if suboffset >= 0: # <<<<<<<<<<<<<<
15486 : * result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
15487 : * break
15488 : */
15489 : }
15490 : }
15491 0 : __pyx_L6_break:;
15492 :
15493 : /* "View.MemoryView":1042
15494 : * break
15495 : *
15496 : * result.view.len = result.view.itemsize # <<<<<<<<<<<<<<
15497 : * for length in result.view.shape[:ndim]:
15498 : * result.view.len *= length
15499 : */
15500 0 : __pyx_t_9 = __pyx_v_result->__pyx_base.view.itemsize;
15501 0 : __pyx_v_result->__pyx_base.view.len = __pyx_t_9;
15502 :
15503 : /* "View.MemoryView":1043
15504 : *
15505 : * result.view.len = result.view.itemsize
15506 : * for length in result.view.shape[:ndim]: # <<<<<<<<<<<<<<
15507 : * result.view.len *= length
15508 : *
15509 : */
15510 0 : __pyx_t_7 = (__pyx_v_result->__pyx_base.view.shape + __pyx_v_ndim);
15511 0 : for (__pyx_t_8 = __pyx_v_result->__pyx_base.view.shape; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) {
15512 0 : __pyx_t_6 = __pyx_t_8;
15513 0 : __pyx_t_2 = PyInt_FromSsize_t((__pyx_t_6[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1043, __pyx_L1_error)
15514 0 : __Pyx_GOTREF(__pyx_t_2);
15515 0 : __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_2);
15516 0 : __pyx_t_2 = 0;
15517 :
15518 : /* "View.MemoryView":1044
15519 : * result.view.len = result.view.itemsize
15520 : * for length in result.view.shape[:ndim]:
15521 : * result.view.len *= length # <<<<<<<<<<<<<<
15522 : *
15523 : * result.to_object_func = to_object_func
15524 : */
15525 0 : __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_result->__pyx_base.view.len); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1044, __pyx_L1_error)
15526 0 : __Pyx_GOTREF(__pyx_t_2);
15527 0 : __pyx_t_3 = PyNumber_InPlaceMultiply(__pyx_t_2, __pyx_v_length); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1044, __pyx_L1_error)
15528 0 : __Pyx_GOTREF(__pyx_t_3);
15529 0 : __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15530 0 : __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 1044, __pyx_L1_error)
15531 0 : __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15532 0 : __pyx_v_result->__pyx_base.view.len = __pyx_t_9;
15533 : }
15534 :
15535 : /* "View.MemoryView":1046
15536 : * result.view.len *= length
15537 : *
15538 : * result.to_object_func = to_object_func # <<<<<<<<<<<<<<
15539 : * result.to_dtype_func = to_dtype_func
15540 : *
15541 : */
15542 0 : __pyx_v_result->to_object_func = __pyx_v_to_object_func;
15543 :
15544 : /* "View.MemoryView":1047
15545 : *
15546 : * result.to_object_func = to_object_func
15547 : * result.to_dtype_func = to_dtype_func # <<<<<<<<<<<<<<
15548 : *
15549 : * return result
15550 : */
15551 0 : __pyx_v_result->to_dtype_func = __pyx_v_to_dtype_func;
15552 :
15553 : /* "View.MemoryView":1049
15554 : * result.to_dtype_func = to_dtype_func
15555 : *
15556 : * return result # <<<<<<<<<<<<<<
15557 : *
15558 : * @cname('__pyx_memoryview_get_slice_from_memoryview')
15559 : */
15560 0 : __Pyx_XDECREF(__pyx_r);
15561 0 : __Pyx_INCREF((PyObject *)__pyx_v_result);
15562 0 : __pyx_r = ((PyObject *)__pyx_v_result);
15563 0 : goto __pyx_L0;
15564 :
15565 : /* "View.MemoryView":999
15566 : *
15567 : * @cname('__pyx_memoryview_fromslice')
15568 : * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice, # <<<<<<<<<<<<<<
15569 : * int ndim,
15570 : * object (*to_object_func)(char *),
15571 : */
15572 :
15573 : /* function exit code */
15574 0 : __pyx_L1_error:;
15575 0 : __Pyx_XDECREF(__pyx_t_2);
15576 0 : __Pyx_XDECREF(__pyx_t_3);
15577 0 : __Pyx_AddTraceback("View.MemoryView.memoryview_fromslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
15578 0 : __pyx_r = 0;
15579 0 : __pyx_L0:;
15580 0 : __Pyx_XDECREF((PyObject *)__pyx_v_result);
15581 0 : __Pyx_XDECREF(__pyx_v_length);
15582 0 : __Pyx_XGIVEREF(__pyx_r);
15583 0 : __Pyx_RefNannyFinishContext();
15584 0 : return __pyx_r;
15585 : }
15586 :
15587 : /* "View.MemoryView":1052
15588 : *
15589 : * @cname('__pyx_memoryview_get_slice_from_memoryview')
15590 : * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview, # <<<<<<<<<<<<<<
15591 : * __Pyx_memviewslice *mslice) except NULL:
15592 : * cdef _memoryviewslice obj
15593 : */
15594 :
15595 0 : static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_mslice) {
15596 0 : struct __pyx_memoryviewslice_obj *__pyx_v_obj = 0;
15597 0 : __Pyx_memviewslice *__pyx_r;
15598 : __Pyx_RefNannyDeclarations
15599 0 : int __pyx_t_1;
15600 0 : PyObject *__pyx_t_2 = NULL;
15601 0 : int __pyx_lineno = 0;
15602 0 : const char *__pyx_filename = NULL;
15603 0 : int __pyx_clineno = 0;
15604 0 : __Pyx_RefNannySetupContext("get_slice_from_memview", 1);
15605 :
15606 : /* "View.MemoryView":1055
15607 : * __Pyx_memviewslice *mslice) except NULL:
15608 : * cdef _memoryviewslice obj
15609 : * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
15610 : * obj = memview
15611 : * return &obj.from_slice
15612 : */
15613 0 : __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type);
15614 0 : if (__pyx_t_1) {
15615 :
15616 : /* "View.MemoryView":1056
15617 : * cdef _memoryviewslice obj
15618 : * if isinstance(memview, _memoryviewslice):
15619 : * obj = memview # <<<<<<<<<<<<<<
15620 : * return &obj.from_slice
15621 : * else:
15622 : */
15623 0 : if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(1, 1056, __pyx_L1_error)
15624 0 : __pyx_t_2 = ((PyObject *)__pyx_v_memview);
15625 0 : __Pyx_INCREF(__pyx_t_2);
15626 0 : __pyx_v_obj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2);
15627 0 : __pyx_t_2 = 0;
15628 :
15629 : /* "View.MemoryView":1057
15630 : * if isinstance(memview, _memoryviewslice):
15631 : * obj = memview
15632 : * return &obj.from_slice # <<<<<<<<<<<<<<
15633 : * else:
15634 : * slice_copy(memview, mslice)
15635 : */
15636 0 : __pyx_r = (&__pyx_v_obj->from_slice);
15637 0 : goto __pyx_L0;
15638 :
15639 : /* "View.MemoryView":1055
15640 : * __Pyx_memviewslice *mslice) except NULL:
15641 : * cdef _memoryviewslice obj
15642 : * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
15643 : * obj = memview
15644 : * return &obj.from_slice
15645 : */
15646 : }
15647 :
15648 : /* "View.MemoryView":1059
15649 : * return &obj.from_slice
15650 : * else:
15651 : * slice_copy(memview, mslice) # <<<<<<<<<<<<<<
15652 : * return mslice
15653 : *
15654 : */
15655 : /*else*/ {
15656 0 : __pyx_memoryview_slice_copy(__pyx_v_memview, __pyx_v_mslice);
15657 :
15658 : /* "View.MemoryView":1060
15659 : * else:
15660 : * slice_copy(memview, mslice)
15661 : * return mslice # <<<<<<<<<<<<<<
15662 : *
15663 : * @cname('__pyx_memoryview_slice_copy')
15664 : */
15665 0 : __pyx_r = __pyx_v_mslice;
15666 0 : goto __pyx_L0;
15667 : }
15668 :
15669 : /* "View.MemoryView":1052
15670 : *
15671 : * @cname('__pyx_memoryview_get_slice_from_memoryview')
15672 : * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview, # <<<<<<<<<<<<<<
15673 : * __Pyx_memviewslice *mslice) except NULL:
15674 : * cdef _memoryviewslice obj
15675 : */
15676 :
15677 : /* function exit code */
15678 0 : __pyx_L1_error:;
15679 0 : __Pyx_XDECREF(__pyx_t_2);
15680 0 : __Pyx_AddTraceback("View.MemoryView.get_slice_from_memview", __pyx_clineno, __pyx_lineno, __pyx_filename);
15681 0 : __pyx_r = NULL;
15682 0 : __pyx_L0:;
15683 0 : __Pyx_XDECREF((PyObject *)__pyx_v_obj);
15684 0 : __Pyx_RefNannyFinishContext();
15685 0 : return __pyx_r;
15686 : }
15687 :
15688 : /* "View.MemoryView":1063
15689 : *
15690 : * @cname('__pyx_memoryview_slice_copy')
15691 : * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst) noexcept: # <<<<<<<<<<<<<<
15692 : * cdef int dim
15693 : * cdef (Py_ssize_t*) shape, strides, suboffsets
15694 : */
15695 :
15696 0 : static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_dst) {
15697 0 : int __pyx_v_dim;
15698 0 : Py_ssize_t *__pyx_v_shape;
15699 0 : Py_ssize_t *__pyx_v_strides;
15700 0 : Py_ssize_t *__pyx_v_suboffsets;
15701 0 : Py_ssize_t *__pyx_t_1;
15702 0 : int __pyx_t_2;
15703 0 : int __pyx_t_3;
15704 0 : int __pyx_t_4;
15705 0 : Py_ssize_t __pyx_t_5;
15706 0 : int __pyx_t_6;
15707 :
15708 : /* "View.MemoryView":1067
15709 : * cdef (Py_ssize_t*) shape, strides, suboffsets
15710 : *
15711 : * shape = memview.view.shape # <<<<<<<<<<<<<<
15712 : * strides = memview.view.strides
15713 : * suboffsets = memview.view.suboffsets
15714 : */
15715 0 : __pyx_t_1 = __pyx_v_memview->view.shape;
15716 0 : __pyx_v_shape = __pyx_t_1;
15717 :
15718 : /* "View.MemoryView":1068
15719 : *
15720 : * shape = memview.view.shape
15721 : * strides = memview.view.strides # <<<<<<<<<<<<<<
15722 : * suboffsets = memview.view.suboffsets
15723 : *
15724 : */
15725 0 : __pyx_t_1 = __pyx_v_memview->view.strides;
15726 0 : __pyx_v_strides = __pyx_t_1;
15727 :
15728 : /* "View.MemoryView":1069
15729 : * shape = memview.view.shape
15730 : * strides = memview.view.strides
15731 : * suboffsets = memview.view.suboffsets # <<<<<<<<<<<<<<
15732 : *
15733 : * dst.memview = <__pyx_memoryview *> memview
15734 : */
15735 0 : __pyx_t_1 = __pyx_v_memview->view.suboffsets;
15736 0 : __pyx_v_suboffsets = __pyx_t_1;
15737 :
15738 : /* "View.MemoryView":1071
15739 : * suboffsets = memview.view.suboffsets
15740 : *
15741 : * dst.memview = <__pyx_memoryview *> memview # <<<<<<<<<<<<<<
15742 : * dst.data = <char *> memview.view.buf
15743 : *
15744 : */
15745 0 : __pyx_v_dst->memview = ((struct __pyx_memoryview_obj *)__pyx_v_memview);
15746 :
15747 : /* "View.MemoryView":1072
15748 : *
15749 : * dst.memview = <__pyx_memoryview *> memview
15750 : * dst.data = <char *> memview.view.buf # <<<<<<<<<<<<<<
15751 : *
15752 : * for dim in range(memview.view.ndim):
15753 : */
15754 0 : __pyx_v_dst->data = ((char *)__pyx_v_memview->view.buf);
15755 :
15756 : /* "View.MemoryView":1074
15757 : * dst.data = <char *> memview.view.buf
15758 : *
15759 : * for dim in range(memview.view.ndim): # <<<<<<<<<<<<<<
15760 : * dst.shape[dim] = shape[dim]
15761 : * dst.strides[dim] = strides[dim]
15762 : */
15763 0 : __pyx_t_2 = __pyx_v_memview->view.ndim;
15764 0 : __pyx_t_3 = __pyx_t_2;
15765 0 : for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
15766 0 : __pyx_v_dim = __pyx_t_4;
15767 :
15768 : /* "View.MemoryView":1075
15769 : *
15770 : * for dim in range(memview.view.ndim):
15771 : * dst.shape[dim] = shape[dim] # <<<<<<<<<<<<<<
15772 : * dst.strides[dim] = strides[dim]
15773 : * dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1
15774 : */
15775 0 : (__pyx_v_dst->shape[__pyx_v_dim]) = (__pyx_v_shape[__pyx_v_dim]);
15776 :
15777 : /* "View.MemoryView":1076
15778 : * for dim in range(memview.view.ndim):
15779 : * dst.shape[dim] = shape[dim]
15780 : * dst.strides[dim] = strides[dim] # <<<<<<<<<<<<<<
15781 : * dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1
15782 : *
15783 : */
15784 0 : (__pyx_v_dst->strides[__pyx_v_dim]) = (__pyx_v_strides[__pyx_v_dim]);
15785 :
15786 : /* "View.MemoryView":1077
15787 : * dst.shape[dim] = shape[dim]
15788 : * dst.strides[dim] = strides[dim]
15789 : * dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1 # <<<<<<<<<<<<<<
15790 : *
15791 : * @cname('__pyx_memoryview_copy_object')
15792 : */
15793 0 : __pyx_t_6 = (__pyx_v_suboffsets != 0);
15794 0 : if (__pyx_t_6) {
15795 0 : __pyx_t_5 = (__pyx_v_suboffsets[__pyx_v_dim]);
15796 : } else {
15797 : __pyx_t_5 = -1L;
15798 : }
15799 0 : (__pyx_v_dst->suboffsets[__pyx_v_dim]) = __pyx_t_5;
15800 : }
15801 :
15802 : /* "View.MemoryView":1063
15803 : *
15804 : * @cname('__pyx_memoryview_slice_copy')
15805 : * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst) noexcept: # <<<<<<<<<<<<<<
15806 : * cdef int dim
15807 : * cdef (Py_ssize_t*) shape, strides, suboffsets
15808 : */
15809 :
15810 : /* function exit code */
15811 0 : }
15812 :
15813 : /* "View.MemoryView":1080
15814 : *
15815 : * @cname('__pyx_memoryview_copy_object')
15816 : * cdef memoryview_copy(memoryview memview): # <<<<<<<<<<<<<<
15817 : * "Create a new memoryview object"
15818 : * cdef __Pyx_memviewslice memviewslice
15819 : */
15820 :
15821 0 : static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *__pyx_v_memview) {
15822 0 : __Pyx_memviewslice __pyx_v_memviewslice;
15823 0 : PyObject *__pyx_r = NULL;
15824 : __Pyx_RefNannyDeclarations
15825 0 : PyObject *__pyx_t_1 = NULL;
15826 0 : int __pyx_lineno = 0;
15827 0 : const char *__pyx_filename = NULL;
15828 0 : int __pyx_clineno = 0;
15829 0 : __Pyx_RefNannySetupContext("memoryview_copy", 1);
15830 :
15831 : /* "View.MemoryView":1083
15832 : * "Create a new memoryview object"
15833 : * cdef __Pyx_memviewslice memviewslice
15834 : * slice_copy(memview, &memviewslice) # <<<<<<<<<<<<<<
15835 : * return memoryview_copy_from_slice(memview, &memviewslice)
15836 : *
15837 : */
15838 0 : __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_memviewslice));
15839 :
15840 : /* "View.MemoryView":1084
15841 : * cdef __Pyx_memviewslice memviewslice
15842 : * slice_copy(memview, &memviewslice)
15843 : * return memoryview_copy_from_slice(memview, &memviewslice) # <<<<<<<<<<<<<<
15844 : *
15845 : * @cname('__pyx_memoryview_copy_object_from_slice')
15846 : */
15847 0 : __Pyx_XDECREF(__pyx_r);
15848 0 : __pyx_t_1 = __pyx_memoryview_copy_object_from_slice(__pyx_v_memview, (&__pyx_v_memviewslice)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1084, __pyx_L1_error)
15849 0 : __Pyx_GOTREF(__pyx_t_1);
15850 0 : __pyx_r = __pyx_t_1;
15851 0 : __pyx_t_1 = 0;
15852 0 : goto __pyx_L0;
15853 :
15854 : /* "View.MemoryView":1080
15855 : *
15856 : * @cname('__pyx_memoryview_copy_object')
15857 : * cdef memoryview_copy(memoryview memview): # <<<<<<<<<<<<<<
15858 : * "Create a new memoryview object"
15859 : * cdef __Pyx_memviewslice memviewslice
15860 : */
15861 :
15862 : /* function exit code */
15863 0 : __pyx_L1_error:;
15864 0 : __Pyx_XDECREF(__pyx_t_1);
15865 0 : __Pyx_AddTraceback("View.MemoryView.memoryview_copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
15866 0 : __pyx_r = 0;
15867 0 : __pyx_L0:;
15868 0 : __Pyx_XGIVEREF(__pyx_r);
15869 0 : __Pyx_RefNannyFinishContext();
15870 0 : return __pyx_r;
15871 : }
15872 :
15873 : /* "View.MemoryView":1087
15874 : *
15875 : * @cname('__pyx_memoryview_copy_object_from_slice')
15876 : * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice): # <<<<<<<<<<<<<<
15877 : * """
15878 : * Create a new memoryview object from a given memoryview object and slice.
15879 : */
15880 :
15881 0 : static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_memviewslice) {
15882 0 : PyObject *(*__pyx_v_to_object_func)(char *);
15883 0 : int (*__pyx_v_to_dtype_func)(char *, PyObject *);
15884 0 : PyObject *__pyx_r = NULL;
15885 : __Pyx_RefNannyDeclarations
15886 0 : int __pyx_t_1;
15887 0 : PyObject *(*__pyx_t_2)(char *);
15888 0 : int (*__pyx_t_3)(char *, PyObject *);
15889 0 : PyObject *__pyx_t_4 = NULL;
15890 0 : int __pyx_lineno = 0;
15891 0 : const char *__pyx_filename = NULL;
15892 0 : int __pyx_clineno = 0;
15893 0 : __Pyx_RefNannySetupContext("memoryview_copy_from_slice", 1);
15894 :
15895 : /* "View.MemoryView":1094
15896 : * cdef int (*to_dtype_func)(char *, object) except 0
15897 : *
15898 : * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
15899 : * to_object_func = (<_memoryviewslice> memview).to_object_func
15900 : * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
15901 : */
15902 0 : __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type);
15903 0 : if (__pyx_t_1) {
15904 :
15905 : /* "View.MemoryView":1095
15906 : *
15907 : * if isinstance(memview, _memoryviewslice):
15908 : * to_object_func = (<_memoryviewslice> memview).to_object_func # <<<<<<<<<<<<<<
15909 : * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
15910 : * else:
15911 : */
15912 0 : __pyx_t_2 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_object_func;
15913 0 : __pyx_v_to_object_func = __pyx_t_2;
15914 :
15915 : /* "View.MemoryView":1096
15916 : * if isinstance(memview, _memoryviewslice):
15917 : * to_object_func = (<_memoryviewslice> memview).to_object_func
15918 : * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func # <<<<<<<<<<<<<<
15919 : * else:
15920 : * to_object_func = NULL
15921 : */
15922 0 : __pyx_t_3 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_dtype_func;
15923 0 : __pyx_v_to_dtype_func = __pyx_t_3;
15924 :
15925 : /* "View.MemoryView":1094
15926 : * cdef int (*to_dtype_func)(char *, object) except 0
15927 : *
15928 : * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
15929 : * to_object_func = (<_memoryviewslice> memview).to_object_func
15930 : * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
15931 : */
15932 0 : goto __pyx_L3;
15933 : }
15934 :
15935 : /* "View.MemoryView":1098
15936 : * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
15937 : * else:
15938 : * to_object_func = NULL # <<<<<<<<<<<<<<
15939 : * to_dtype_func = NULL
15940 : *
15941 : */
15942 : /*else*/ {
15943 : __pyx_v_to_object_func = NULL;
15944 :
15945 : /* "View.MemoryView":1099
15946 : * else:
15947 : * to_object_func = NULL
15948 : * to_dtype_func = NULL # <<<<<<<<<<<<<<
15949 : *
15950 : * return memoryview_fromslice(memviewslice[0], memview.view.ndim,
15951 : */
15952 : __pyx_v_to_dtype_func = NULL;
15953 : }
15954 0 : __pyx_L3:;
15955 :
15956 : /* "View.MemoryView":1101
15957 : * to_dtype_func = NULL
15958 : *
15959 : * return memoryview_fromslice(memviewslice[0], memview.view.ndim, # <<<<<<<<<<<<<<
15960 : * to_object_func, to_dtype_func,
15961 : * memview.dtype_is_object)
15962 : */
15963 0 : __Pyx_XDECREF(__pyx_r);
15964 :
15965 : /* "View.MemoryView":1103
15966 : * return memoryview_fromslice(memviewslice[0], memview.view.ndim,
15967 : * to_object_func, to_dtype_func,
15968 : * memview.dtype_is_object) # <<<<<<<<<<<<<<
15969 : *
15970 : *
15971 : */
15972 0 : __pyx_t_4 = __pyx_memoryview_fromslice((__pyx_v_memviewslice[0]), __pyx_v_memview->view.ndim, __pyx_v_to_object_func, __pyx_v_to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1101, __pyx_L1_error)
15973 0 : __Pyx_GOTREF(__pyx_t_4);
15974 0 : __pyx_r = __pyx_t_4;
15975 0 : __pyx_t_4 = 0;
15976 0 : goto __pyx_L0;
15977 :
15978 : /* "View.MemoryView":1087
15979 : *
15980 : * @cname('__pyx_memoryview_copy_object_from_slice')
15981 : * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice): # <<<<<<<<<<<<<<
15982 : * """
15983 : * Create a new memoryview object from a given memoryview object and slice.
15984 : */
15985 :
15986 : /* function exit code */
15987 0 : __pyx_L1_error:;
15988 0 : __Pyx_XDECREF(__pyx_t_4);
15989 0 : __Pyx_AddTraceback("View.MemoryView.memoryview_copy_from_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
15990 0 : __pyx_r = 0;
15991 0 : __pyx_L0:;
15992 0 : __Pyx_XGIVEREF(__pyx_r);
15993 0 : __Pyx_RefNannyFinishContext();
15994 0 : return __pyx_r;
15995 : }
15996 :
15997 : /* "View.MemoryView":1109
15998 : *
15999 : *
16000 : * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) noexcept nogil: # <<<<<<<<<<<<<<
16001 : * return -arg if arg < 0 else arg
16002 : *
16003 : */
16004 :
16005 1752 : static Py_ssize_t abs_py_ssize_t(Py_ssize_t __pyx_v_arg) {
16006 1752 : Py_ssize_t __pyx_r;
16007 1752 : Py_ssize_t __pyx_t_1;
16008 1752 : int __pyx_t_2;
16009 :
16010 : /* "View.MemoryView":1110
16011 : *
16012 : * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) noexcept nogil:
16013 : * return -arg if arg < 0 else arg # <<<<<<<<<<<<<<
16014 : *
16015 : * @cname('__pyx_get_best_slice_order')
16016 : */
16017 1752 : __pyx_t_2 = (__pyx_v_arg < 0);
16018 1752 : if (__pyx_t_2) {
16019 : __pyx_t_1 = (-__pyx_v_arg);
16020 : } else {
16021 : __pyx_t_1 = __pyx_v_arg;
16022 : }
16023 1752 : __pyx_r = __pyx_t_1;
16024 1752 : goto __pyx_L0;
16025 :
16026 : /* "View.MemoryView":1109
16027 : *
16028 : *
16029 : * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) noexcept nogil: # <<<<<<<<<<<<<<
16030 : * return -arg if arg < 0 else arg
16031 : *
16032 : */
16033 :
16034 : /* function exit code */
16035 1752 : __pyx_L0:;
16036 1752 : return __pyx_r;
16037 : }
16038 :
16039 : /* "View.MemoryView":1113
16040 : *
16041 : * @cname('__pyx_get_best_slice_order')
16042 : * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) noexcept nogil: # <<<<<<<<<<<<<<
16043 : * """
16044 : * Figure out the best memory access order for a given slice.
16045 : */
16046 :
16047 1752 : static char __pyx_get_best_slice_order(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim) {
16048 1752 : int __pyx_v_i;
16049 1752 : Py_ssize_t __pyx_v_c_stride;
16050 1752 : Py_ssize_t __pyx_v_f_stride;
16051 1752 : char __pyx_r;
16052 1752 : int __pyx_t_1;
16053 1752 : int __pyx_t_2;
16054 1752 : int __pyx_t_3;
16055 1752 : int __pyx_t_4;
16056 :
16057 : /* "View.MemoryView":1118
16058 : * """
16059 : * cdef int i
16060 : * cdef Py_ssize_t c_stride = 0 # <<<<<<<<<<<<<<
16061 : * cdef Py_ssize_t f_stride = 0
16062 : *
16063 : */
16064 1752 : __pyx_v_c_stride = 0;
16065 :
16066 : /* "View.MemoryView":1119
16067 : * cdef int i
16068 : * cdef Py_ssize_t c_stride = 0
16069 : * cdef Py_ssize_t f_stride = 0 # <<<<<<<<<<<<<<
16070 : *
16071 : * for i in range(ndim - 1, -1, -1):
16072 : */
16073 1752 : __pyx_v_f_stride = 0;
16074 :
16075 : /* "View.MemoryView":1121
16076 : * cdef Py_ssize_t f_stride = 0
16077 : *
16078 : * for i in range(ndim - 1, -1, -1): # <<<<<<<<<<<<<<
16079 : * if mslice.shape[i] > 1:
16080 : * c_stride = mslice.strides[i]
16081 : */
16082 2043 : for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) {
16083 1752 : __pyx_v_i = __pyx_t_1;
16084 :
16085 : /* "View.MemoryView":1122
16086 : *
16087 : * for i in range(ndim - 1, -1, -1):
16088 : * if mslice.shape[i] > 1: # <<<<<<<<<<<<<<
16089 : * c_stride = mslice.strides[i]
16090 : * break
16091 : */
16092 1752 : __pyx_t_2 = ((__pyx_v_mslice->shape[__pyx_v_i]) > 1);
16093 1752 : if (__pyx_t_2) {
16094 :
16095 : /* "View.MemoryView":1123
16096 : * for i in range(ndim - 1, -1, -1):
16097 : * if mslice.shape[i] > 1:
16098 : * c_stride = mslice.strides[i] # <<<<<<<<<<<<<<
16099 : * break
16100 : *
16101 : */
16102 1461 : __pyx_v_c_stride = (__pyx_v_mslice->strides[__pyx_v_i]);
16103 :
16104 : /* "View.MemoryView":1124
16105 : * if mslice.shape[i] > 1:
16106 : * c_stride = mslice.strides[i]
16107 : * break # <<<<<<<<<<<<<<
16108 : *
16109 : * for i in range(ndim):
16110 : */
16111 1461 : goto __pyx_L4_break;
16112 :
16113 : /* "View.MemoryView":1122
16114 : *
16115 : * for i in range(ndim - 1, -1, -1):
16116 : * if mslice.shape[i] > 1: # <<<<<<<<<<<<<<
16117 : * c_stride = mslice.strides[i]
16118 : * break
16119 : */
16120 : }
16121 : }
16122 291 : __pyx_L4_break:;
16123 :
16124 : /* "View.MemoryView":1126
16125 : * break
16126 : *
16127 : * for i in range(ndim): # <<<<<<<<<<<<<<
16128 : * if mslice.shape[i] > 1:
16129 : * f_stride = mslice.strides[i]
16130 : */
16131 1752 : __pyx_t_1 = __pyx_v_ndim;
16132 1752 : __pyx_t_3 = __pyx_t_1;
16133 2043 : for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
16134 1752 : __pyx_v_i = __pyx_t_4;
16135 :
16136 : /* "View.MemoryView":1127
16137 : *
16138 : * for i in range(ndim):
16139 : * if mslice.shape[i] > 1: # <<<<<<<<<<<<<<
16140 : * f_stride = mslice.strides[i]
16141 : * break
16142 : */
16143 1752 : __pyx_t_2 = ((__pyx_v_mslice->shape[__pyx_v_i]) > 1);
16144 1752 : if (__pyx_t_2) {
16145 :
16146 : /* "View.MemoryView":1128
16147 : * for i in range(ndim):
16148 : * if mslice.shape[i] > 1:
16149 : * f_stride = mslice.strides[i] # <<<<<<<<<<<<<<
16150 : * break
16151 : *
16152 : */
16153 1461 : __pyx_v_f_stride = (__pyx_v_mslice->strides[__pyx_v_i]);
16154 :
16155 : /* "View.MemoryView":1129
16156 : * if mslice.shape[i] > 1:
16157 : * f_stride = mslice.strides[i]
16158 : * break # <<<<<<<<<<<<<<
16159 : *
16160 : * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):
16161 : */
16162 1461 : goto __pyx_L7_break;
16163 :
16164 : /* "View.MemoryView":1127
16165 : *
16166 : * for i in range(ndim):
16167 : * if mslice.shape[i] > 1: # <<<<<<<<<<<<<<
16168 : * f_stride = mslice.strides[i]
16169 : * break
16170 : */
16171 : }
16172 : }
16173 291 : __pyx_L7_break:;
16174 :
16175 : /* "View.MemoryView":1131
16176 : * break
16177 : *
16178 : * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride): # <<<<<<<<<<<<<<
16179 : * return 'C'
16180 : * else:
16181 : */
16182 1752 : __pyx_t_2 = (abs_py_ssize_t(__pyx_v_c_stride) <= abs_py_ssize_t(__pyx_v_f_stride));
16183 1752 : if (__pyx_t_2) {
16184 :
16185 : /* "View.MemoryView":1132
16186 : *
16187 : * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):
16188 : * return 'C' # <<<<<<<<<<<<<<
16189 : * else:
16190 : * return 'F'
16191 : */
16192 1752 : __pyx_r = 'C';
16193 1752 : goto __pyx_L0;
16194 :
16195 : /* "View.MemoryView":1131
16196 : * break
16197 : *
16198 : * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride): # <<<<<<<<<<<<<<
16199 : * return 'C'
16200 : * else:
16201 : */
16202 : }
16203 :
16204 : /* "View.MemoryView":1134
16205 : * return 'C'
16206 : * else:
16207 : * return 'F' # <<<<<<<<<<<<<<
16208 : *
16209 : * @cython.cdivision(True)
16210 : */
16211 : /*else*/ {
16212 0 : __pyx_r = 'F';
16213 0 : goto __pyx_L0;
16214 : }
16215 :
16216 : /* "View.MemoryView":1113
16217 : *
16218 : * @cname('__pyx_get_best_slice_order')
16219 : * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) noexcept nogil: # <<<<<<<<<<<<<<
16220 : * """
16221 : * Figure out the best memory access order for a given slice.
16222 : */
16223 :
16224 : /* function exit code */
16225 1752 : __pyx_L0:;
16226 1752 : return __pyx_r;
16227 : }
16228 :
16229 : /* "View.MemoryView":1137
16230 : *
16231 : * @cython.cdivision(True)
16232 : * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides, # <<<<<<<<<<<<<<
16233 : * char *dst_data, Py_ssize_t *dst_strides,
16234 : * Py_ssize_t *src_shape, Py_ssize_t *dst_shape,
16235 : */
16236 :
16237 0 : static void _copy_strided_to_strided(char *__pyx_v_src_data, Py_ssize_t *__pyx_v_src_strides, char *__pyx_v_dst_data, Py_ssize_t *__pyx_v_dst_strides, Py_ssize_t *__pyx_v_src_shape, Py_ssize_t *__pyx_v_dst_shape, int __pyx_v_ndim, size_t __pyx_v_itemsize) {
16238 0 : CYTHON_UNUSED Py_ssize_t __pyx_v_i;
16239 0 : CYTHON_UNUSED Py_ssize_t __pyx_v_src_extent;
16240 0 : Py_ssize_t __pyx_v_dst_extent;
16241 0 : Py_ssize_t __pyx_v_src_stride;
16242 0 : Py_ssize_t __pyx_v_dst_stride;
16243 0 : int __pyx_t_1;
16244 0 : int __pyx_t_2;
16245 0 : Py_ssize_t __pyx_t_3;
16246 0 : Py_ssize_t __pyx_t_4;
16247 0 : Py_ssize_t __pyx_t_5;
16248 :
16249 : /* "View.MemoryView":1144
16250 : *
16251 : * cdef Py_ssize_t i
16252 : * cdef Py_ssize_t src_extent = src_shape[0] # <<<<<<<<<<<<<<
16253 : * cdef Py_ssize_t dst_extent = dst_shape[0]
16254 : * cdef Py_ssize_t src_stride = src_strides[0]
16255 : */
16256 0 : __pyx_v_src_extent = (__pyx_v_src_shape[0]);
16257 :
16258 : /* "View.MemoryView":1145
16259 : * cdef Py_ssize_t i
16260 : * cdef Py_ssize_t src_extent = src_shape[0]
16261 : * cdef Py_ssize_t dst_extent = dst_shape[0] # <<<<<<<<<<<<<<
16262 : * cdef Py_ssize_t src_stride = src_strides[0]
16263 : * cdef Py_ssize_t dst_stride = dst_strides[0]
16264 : */
16265 0 : __pyx_v_dst_extent = (__pyx_v_dst_shape[0]);
16266 :
16267 : /* "View.MemoryView":1146
16268 : * cdef Py_ssize_t src_extent = src_shape[0]
16269 : * cdef Py_ssize_t dst_extent = dst_shape[0]
16270 : * cdef Py_ssize_t src_stride = src_strides[0] # <<<<<<<<<<<<<<
16271 : * cdef Py_ssize_t dst_stride = dst_strides[0]
16272 : *
16273 : */
16274 0 : __pyx_v_src_stride = (__pyx_v_src_strides[0]);
16275 :
16276 : /* "View.MemoryView":1147
16277 : * cdef Py_ssize_t dst_extent = dst_shape[0]
16278 : * cdef Py_ssize_t src_stride = src_strides[0]
16279 : * cdef Py_ssize_t dst_stride = dst_strides[0] # <<<<<<<<<<<<<<
16280 : *
16281 : * if ndim == 1:
16282 : */
16283 0 : __pyx_v_dst_stride = (__pyx_v_dst_strides[0]);
16284 :
16285 : /* "View.MemoryView":1149
16286 : * cdef Py_ssize_t dst_stride = dst_strides[0]
16287 : *
16288 : * if ndim == 1: # <<<<<<<<<<<<<<
16289 : * if (src_stride > 0 and dst_stride > 0 and
16290 : * <size_t> src_stride == itemsize == <size_t> dst_stride):
16291 : */
16292 0 : __pyx_t_1 = (__pyx_v_ndim == 1);
16293 0 : if (__pyx_t_1) {
16294 :
16295 : /* "View.MemoryView":1150
16296 : *
16297 : * if ndim == 1:
16298 : * if (src_stride > 0 and dst_stride > 0 and # <<<<<<<<<<<<<<
16299 : * <size_t> src_stride == itemsize == <size_t> dst_stride):
16300 : * memcpy(dst_data, src_data, itemsize * dst_extent)
16301 : */
16302 0 : __pyx_t_2 = (__pyx_v_src_stride > 0);
16303 0 : if (__pyx_t_2) {
16304 0 : } else {
16305 0 : __pyx_t_1 = __pyx_t_2;
16306 0 : goto __pyx_L5_bool_binop_done;
16307 : }
16308 0 : __pyx_t_2 = (__pyx_v_dst_stride > 0);
16309 0 : if (__pyx_t_2) {
16310 0 : } else {
16311 0 : __pyx_t_1 = __pyx_t_2;
16312 0 : goto __pyx_L5_bool_binop_done;
16313 : }
16314 :
16315 : /* "View.MemoryView":1151
16316 : * if ndim == 1:
16317 : * if (src_stride > 0 and dst_stride > 0 and
16318 : * <size_t> src_stride == itemsize == <size_t> dst_stride): # <<<<<<<<<<<<<<
16319 : * memcpy(dst_data, src_data, itemsize * dst_extent)
16320 : * else:
16321 : */
16322 0 : __pyx_t_2 = (((size_t)__pyx_v_src_stride) == __pyx_v_itemsize);
16323 0 : if (__pyx_t_2) {
16324 0 : __pyx_t_2 = (__pyx_v_itemsize == ((size_t)__pyx_v_dst_stride));
16325 : }
16326 : __pyx_t_1 = __pyx_t_2;
16327 0 : __pyx_L5_bool_binop_done:;
16328 :
16329 : /* "View.MemoryView":1150
16330 : *
16331 : * if ndim == 1:
16332 : * if (src_stride > 0 and dst_stride > 0 and # <<<<<<<<<<<<<<
16333 : * <size_t> src_stride == itemsize == <size_t> dst_stride):
16334 : * memcpy(dst_data, src_data, itemsize * dst_extent)
16335 : */
16336 0 : if (__pyx_t_1) {
16337 :
16338 : /* "View.MemoryView":1152
16339 : * if (src_stride > 0 and dst_stride > 0 and
16340 : * <size_t> src_stride == itemsize == <size_t> dst_stride):
16341 : * memcpy(dst_data, src_data, itemsize * dst_extent) # <<<<<<<<<<<<<<
16342 : * else:
16343 : * for i in range(dst_extent):
16344 : */
16345 0 : (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, (__pyx_v_itemsize * __pyx_v_dst_extent)));
16346 :
16347 : /* "View.MemoryView":1150
16348 : *
16349 : * if ndim == 1:
16350 : * if (src_stride > 0 and dst_stride > 0 and # <<<<<<<<<<<<<<
16351 : * <size_t> src_stride == itemsize == <size_t> dst_stride):
16352 : * memcpy(dst_data, src_data, itemsize * dst_extent)
16353 : */
16354 0 : goto __pyx_L4;
16355 : }
16356 :
16357 : /* "View.MemoryView":1154
16358 : * memcpy(dst_data, src_data, itemsize * dst_extent)
16359 : * else:
16360 : * for i in range(dst_extent): # <<<<<<<<<<<<<<
16361 : * memcpy(dst_data, src_data, itemsize)
16362 : * src_data += src_stride
16363 : */
16364 : /*else*/ {
16365 : __pyx_t_3 = __pyx_v_dst_extent;
16366 : __pyx_t_4 = __pyx_t_3;
16367 0 : for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
16368 0 : __pyx_v_i = __pyx_t_5;
16369 :
16370 : /* "View.MemoryView":1155
16371 : * else:
16372 : * for i in range(dst_extent):
16373 : * memcpy(dst_data, src_data, itemsize) # <<<<<<<<<<<<<<
16374 : * src_data += src_stride
16375 : * dst_data += dst_stride
16376 : */
16377 0 : (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, __pyx_v_itemsize));
16378 :
16379 : /* "View.MemoryView":1156
16380 : * for i in range(dst_extent):
16381 : * memcpy(dst_data, src_data, itemsize)
16382 : * src_data += src_stride # <<<<<<<<<<<<<<
16383 : * dst_data += dst_stride
16384 : * else:
16385 : */
16386 0 : __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride);
16387 :
16388 : /* "View.MemoryView":1157
16389 : * memcpy(dst_data, src_data, itemsize)
16390 : * src_data += src_stride
16391 : * dst_data += dst_stride # <<<<<<<<<<<<<<
16392 : * else:
16393 : * for i in range(dst_extent):
16394 : */
16395 0 : __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride);
16396 : }
16397 : }
16398 0 : __pyx_L4:;
16399 :
16400 : /* "View.MemoryView":1149
16401 : * cdef Py_ssize_t dst_stride = dst_strides[0]
16402 : *
16403 : * if ndim == 1: # <<<<<<<<<<<<<<
16404 : * if (src_stride > 0 and dst_stride > 0 and
16405 : * <size_t> src_stride == itemsize == <size_t> dst_stride):
16406 : */
16407 0 : goto __pyx_L3;
16408 : }
16409 :
16410 : /* "View.MemoryView":1159
16411 : * dst_data += dst_stride
16412 : * else:
16413 : * for i in range(dst_extent): # <<<<<<<<<<<<<<
16414 : * _copy_strided_to_strided(src_data, src_strides + 1,
16415 : * dst_data, dst_strides + 1,
16416 : */
16417 : /*else*/ {
16418 : __pyx_t_3 = __pyx_v_dst_extent;
16419 : __pyx_t_4 = __pyx_t_3;
16420 0 : for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
16421 0 : __pyx_v_i = __pyx_t_5;
16422 :
16423 : /* "View.MemoryView":1160
16424 : * else:
16425 : * for i in range(dst_extent):
16426 : * _copy_strided_to_strided(src_data, src_strides + 1, # <<<<<<<<<<<<<<
16427 : * dst_data, dst_strides + 1,
16428 : * src_shape + 1, dst_shape + 1,
16429 : */
16430 0 : _copy_strided_to_strided(__pyx_v_src_data, (__pyx_v_src_strides + 1), __pyx_v_dst_data, (__pyx_v_dst_strides + 1), (__pyx_v_src_shape + 1), (__pyx_v_dst_shape + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize);
16431 :
16432 : /* "View.MemoryView":1164
16433 : * src_shape + 1, dst_shape + 1,
16434 : * ndim - 1, itemsize)
16435 : * src_data += src_stride # <<<<<<<<<<<<<<
16436 : * dst_data += dst_stride
16437 : *
16438 : */
16439 0 : __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride);
16440 :
16441 : /* "View.MemoryView":1165
16442 : * ndim - 1, itemsize)
16443 : * src_data += src_stride
16444 : * dst_data += dst_stride # <<<<<<<<<<<<<<
16445 : *
16446 : * cdef void copy_strided_to_strided(__Pyx_memviewslice *src,
16447 : */
16448 0 : __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride);
16449 : }
16450 : }
16451 0 : __pyx_L3:;
16452 :
16453 : /* "View.MemoryView":1137
16454 : *
16455 : * @cython.cdivision(True)
16456 : * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides, # <<<<<<<<<<<<<<
16457 : * char *dst_data, Py_ssize_t *dst_strides,
16458 : * Py_ssize_t *src_shape, Py_ssize_t *dst_shape,
16459 : */
16460 :
16461 : /* function exit code */
16462 0 : }
16463 :
16464 : /* "View.MemoryView":1167
16465 : * dst_data += dst_stride
16466 : *
16467 : * cdef void copy_strided_to_strided(__Pyx_memviewslice *src, # <<<<<<<<<<<<<<
16468 : * __Pyx_memviewslice *dst,
16469 : * int ndim, size_t itemsize) noexcept nogil:
16470 : */
16471 :
16472 0 : static void copy_strided_to_strided(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize) {
16473 :
16474 : /* "View.MemoryView":1170
16475 : * __Pyx_memviewslice *dst,
16476 : * int ndim, size_t itemsize) noexcept nogil:
16477 : * _copy_strided_to_strided(src.data, src.strides, dst.data, dst.strides, # <<<<<<<<<<<<<<
16478 : * src.shape, dst.shape, ndim, itemsize)
16479 : *
16480 : */
16481 0 : _copy_strided_to_strided(__pyx_v_src->data, __pyx_v_src->strides, __pyx_v_dst->data, __pyx_v_dst->strides, __pyx_v_src->shape, __pyx_v_dst->shape, __pyx_v_ndim, __pyx_v_itemsize);
16482 :
16483 : /* "View.MemoryView":1167
16484 : * dst_data += dst_stride
16485 : *
16486 : * cdef void copy_strided_to_strided(__Pyx_memviewslice *src, # <<<<<<<<<<<<<<
16487 : * __Pyx_memviewslice *dst,
16488 : * int ndim, size_t itemsize) noexcept nogil:
16489 : */
16490 :
16491 : /* function exit code */
16492 0 : }
16493 :
16494 : /* "View.MemoryView":1174
16495 : *
16496 : * @cname('__pyx_memoryview_slice_get_size')
16497 : * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) noexcept nogil: # <<<<<<<<<<<<<<
16498 : * "Return the size of the memory occupied by the slice in number of bytes"
16499 : * cdef Py_ssize_t shape, size = src.memview.view.itemsize
16500 : */
16501 :
16502 1752 : static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *__pyx_v_src, int __pyx_v_ndim) {
16503 1752 : Py_ssize_t __pyx_v_shape;
16504 1752 : Py_ssize_t __pyx_v_size;
16505 1752 : Py_ssize_t __pyx_r;
16506 1752 : Py_ssize_t __pyx_t_1;
16507 1752 : Py_ssize_t *__pyx_t_2;
16508 1752 : Py_ssize_t *__pyx_t_3;
16509 1752 : Py_ssize_t *__pyx_t_4;
16510 :
16511 : /* "View.MemoryView":1176
16512 : * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) noexcept nogil:
16513 : * "Return the size of the memory occupied by the slice in number of bytes"
16514 : * cdef Py_ssize_t shape, size = src.memview.view.itemsize # <<<<<<<<<<<<<<
16515 : *
16516 : * for shape in src.shape[:ndim]:
16517 : */
16518 1752 : __pyx_t_1 = __pyx_v_src->memview->view.itemsize;
16519 1752 : __pyx_v_size = __pyx_t_1;
16520 :
16521 : /* "View.MemoryView":1178
16522 : * cdef Py_ssize_t shape, size = src.memview.view.itemsize
16523 : *
16524 : * for shape in src.shape[:ndim]: # <<<<<<<<<<<<<<
16525 : * size *= shape
16526 : *
16527 : */
16528 1752 : __pyx_t_3 = (__pyx_v_src->shape + __pyx_v_ndim);
16529 3504 : for (__pyx_t_4 = __pyx_v_src->shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {
16530 1752 : __pyx_t_2 = __pyx_t_4;
16531 1752 : __pyx_v_shape = (__pyx_t_2[0]);
16532 :
16533 : /* "View.MemoryView":1179
16534 : *
16535 : * for shape in src.shape[:ndim]:
16536 : * size *= shape # <<<<<<<<<<<<<<
16537 : *
16538 : * return size
16539 : */
16540 1752 : __pyx_v_size = (__pyx_v_size * __pyx_v_shape);
16541 : }
16542 :
16543 : /* "View.MemoryView":1181
16544 : * size *= shape
16545 : *
16546 : * return size # <<<<<<<<<<<<<<
16547 : *
16548 : * @cname('__pyx_fill_contig_strides_array')
16549 : */
16550 1752 : __pyx_r = __pyx_v_size;
16551 1752 : goto __pyx_L0;
16552 :
16553 : /* "View.MemoryView":1174
16554 : *
16555 : * @cname('__pyx_memoryview_slice_get_size')
16556 : * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) noexcept nogil: # <<<<<<<<<<<<<<
16557 : * "Return the size of the memory occupied by the slice in number of bytes"
16558 : * cdef Py_ssize_t shape, size = src.memview.view.itemsize
16559 : */
16560 :
16561 : /* function exit code */
16562 1752 : __pyx_L0:;
16563 1752 : return __pyx_r;
16564 : }
16565 :
16566 : /* "View.MemoryView":1184
16567 : *
16568 : * @cname('__pyx_fill_contig_strides_array')
16569 : * cdef Py_ssize_t fill_contig_strides_array( # <<<<<<<<<<<<<<
16570 : * Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride,
16571 : * int ndim, char order) noexcept nogil:
16572 : */
16573 :
16574 0 : static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, Py_ssize_t __pyx_v_stride, int __pyx_v_ndim, char __pyx_v_order) {
16575 0 : int __pyx_v_idx;
16576 0 : Py_ssize_t __pyx_r;
16577 0 : int __pyx_t_1;
16578 0 : int __pyx_t_2;
16579 0 : int __pyx_t_3;
16580 0 : int __pyx_t_4;
16581 :
16582 : /* "View.MemoryView":1193
16583 : * cdef int idx
16584 : *
16585 : * if order == 'F': # <<<<<<<<<<<<<<
16586 : * for idx in range(ndim):
16587 : * strides[idx] = stride
16588 : */
16589 0 : __pyx_t_1 = (__pyx_v_order == 'F');
16590 0 : if (__pyx_t_1) {
16591 :
16592 : /* "View.MemoryView":1194
16593 : *
16594 : * if order == 'F':
16595 : * for idx in range(ndim): # <<<<<<<<<<<<<<
16596 : * strides[idx] = stride
16597 : * stride *= shape[idx]
16598 : */
16599 0 : __pyx_t_2 = __pyx_v_ndim;
16600 : __pyx_t_3 = __pyx_t_2;
16601 0 : for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
16602 0 : __pyx_v_idx = __pyx_t_4;
16603 :
16604 : /* "View.MemoryView":1195
16605 : * if order == 'F':
16606 : * for idx in range(ndim):
16607 : * strides[idx] = stride # <<<<<<<<<<<<<<
16608 : * stride *= shape[idx]
16609 : * else:
16610 : */
16611 0 : (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride;
16612 :
16613 : /* "View.MemoryView":1196
16614 : * for idx in range(ndim):
16615 : * strides[idx] = stride
16616 : * stride *= shape[idx] # <<<<<<<<<<<<<<
16617 : * else:
16618 : * for idx in range(ndim - 1, -1, -1):
16619 : */
16620 0 : __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx]));
16621 : }
16622 :
16623 : /* "View.MemoryView":1193
16624 : * cdef int idx
16625 : *
16626 : * if order == 'F': # <<<<<<<<<<<<<<
16627 : * for idx in range(ndim):
16628 : * strides[idx] = stride
16629 : */
16630 0 : goto __pyx_L3;
16631 : }
16632 :
16633 : /* "View.MemoryView":1198
16634 : * stride *= shape[idx]
16635 : * else:
16636 : * for idx in range(ndim - 1, -1, -1): # <<<<<<<<<<<<<<
16637 : * strides[idx] = stride
16638 : * stride *= shape[idx]
16639 : */
16640 : /*else*/ {
16641 0 : for (__pyx_t_2 = (__pyx_v_ndim - 1); __pyx_t_2 > -1; __pyx_t_2-=1) {
16642 0 : __pyx_v_idx = __pyx_t_2;
16643 :
16644 : /* "View.MemoryView":1199
16645 : * else:
16646 : * for idx in range(ndim - 1, -1, -1):
16647 : * strides[idx] = stride # <<<<<<<<<<<<<<
16648 : * stride *= shape[idx]
16649 : *
16650 : */
16651 0 : (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride;
16652 :
16653 : /* "View.MemoryView":1200
16654 : * for idx in range(ndim - 1, -1, -1):
16655 : * strides[idx] = stride
16656 : * stride *= shape[idx] # <<<<<<<<<<<<<<
16657 : *
16658 : * return stride
16659 : */
16660 0 : __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx]));
16661 : }
16662 : }
16663 0 : __pyx_L3:;
16664 :
16665 : /* "View.MemoryView":1202
16666 : * stride *= shape[idx]
16667 : *
16668 : * return stride # <<<<<<<<<<<<<<
16669 : *
16670 : * @cname('__pyx_memoryview_copy_data_to_temp')
16671 : */
16672 0 : __pyx_r = __pyx_v_stride;
16673 0 : goto __pyx_L0;
16674 :
16675 : /* "View.MemoryView":1184
16676 : *
16677 : * @cname('__pyx_fill_contig_strides_array')
16678 : * cdef Py_ssize_t fill_contig_strides_array( # <<<<<<<<<<<<<<
16679 : * Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride,
16680 : * int ndim, char order) noexcept nogil:
16681 : */
16682 :
16683 : /* function exit code */
16684 0 : __pyx_L0:;
16685 0 : return __pyx_r;
16686 : }
16687 :
16688 : /* "View.MemoryView":1205
16689 : *
16690 : * @cname('__pyx_memoryview_copy_data_to_temp')
16691 : * cdef void *copy_data_to_temp(__Pyx_memviewslice *src, # <<<<<<<<<<<<<<
16692 : * __Pyx_memviewslice *tmpslice,
16693 : * char order,
16694 : */
16695 :
16696 0 : static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_tmpslice, char __pyx_v_order, int __pyx_v_ndim) {
16697 0 : int __pyx_v_i;
16698 0 : void *__pyx_v_result;
16699 0 : size_t __pyx_v_itemsize;
16700 0 : size_t __pyx_v_size;
16701 0 : void *__pyx_r;
16702 0 : Py_ssize_t __pyx_t_1;
16703 0 : int __pyx_t_2;
16704 0 : int __pyx_t_3;
16705 0 : struct __pyx_memoryview_obj *__pyx_t_4;
16706 0 : int __pyx_t_5;
16707 0 : int __pyx_t_6;
16708 0 : int __pyx_lineno = 0;
16709 0 : const char *__pyx_filename = NULL;
16710 0 : int __pyx_clineno = 0;
16711 : #ifdef WITH_THREAD
16712 0 : PyGILState_STATE __pyx_gilstate_save;
16713 : #endif
16714 :
16715 : /* "View.MemoryView":1216
16716 : * cdef void *result
16717 : *
16718 : * cdef size_t itemsize = src.memview.view.itemsize # <<<<<<<<<<<<<<
16719 : * cdef size_t size = slice_get_size(src, ndim)
16720 : *
16721 : */
16722 0 : __pyx_t_1 = __pyx_v_src->memview->view.itemsize;
16723 0 : __pyx_v_itemsize = __pyx_t_1;
16724 :
16725 : /* "View.MemoryView":1217
16726 : *
16727 : * cdef size_t itemsize = src.memview.view.itemsize
16728 : * cdef size_t size = slice_get_size(src, ndim) # <<<<<<<<<<<<<<
16729 : *
16730 : * result = malloc(size)
16731 : */
16732 0 : __pyx_v_size = __pyx_memoryview_slice_get_size(__pyx_v_src, __pyx_v_ndim);
16733 :
16734 : /* "View.MemoryView":1219
16735 : * cdef size_t size = slice_get_size(src, ndim)
16736 : *
16737 : * result = malloc(size) # <<<<<<<<<<<<<<
16738 : * if not result:
16739 : * _err_no_memory()
16740 : */
16741 0 : __pyx_v_result = malloc(__pyx_v_size);
16742 :
16743 : /* "View.MemoryView":1220
16744 : *
16745 : * result = malloc(size)
16746 : * if not result: # <<<<<<<<<<<<<<
16747 : * _err_no_memory()
16748 : *
16749 : */
16750 0 : __pyx_t_2 = (!(__pyx_v_result != 0));
16751 0 : if (__pyx_t_2) {
16752 :
16753 : /* "View.MemoryView":1221
16754 : * result = malloc(size)
16755 : * if not result:
16756 : * _err_no_memory() # <<<<<<<<<<<<<<
16757 : *
16758 : *
16759 : */
16760 0 : __pyx_t_3 = __pyx_memoryview_err_no_memory(); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 1221, __pyx_L1_error)
16761 :
16762 : /* "View.MemoryView":1220
16763 : *
16764 : * result = malloc(size)
16765 : * if not result: # <<<<<<<<<<<<<<
16766 : * _err_no_memory()
16767 : *
16768 : */
16769 : }
16770 :
16771 : /* "View.MemoryView":1224
16772 : *
16773 : *
16774 : * tmpslice.data = <char *> result # <<<<<<<<<<<<<<
16775 : * tmpslice.memview = src.memview
16776 : * for i in range(ndim):
16777 : */
16778 0 : __pyx_v_tmpslice->data = ((char *)__pyx_v_result);
16779 :
16780 : /* "View.MemoryView":1225
16781 : *
16782 : * tmpslice.data = <char *> result
16783 : * tmpslice.memview = src.memview # <<<<<<<<<<<<<<
16784 : * for i in range(ndim):
16785 : * tmpslice.shape[i] = src.shape[i]
16786 : */
16787 0 : __pyx_t_4 = __pyx_v_src->memview;
16788 0 : __pyx_v_tmpslice->memview = __pyx_t_4;
16789 :
16790 : /* "View.MemoryView":1226
16791 : * tmpslice.data = <char *> result
16792 : * tmpslice.memview = src.memview
16793 : * for i in range(ndim): # <<<<<<<<<<<<<<
16794 : * tmpslice.shape[i] = src.shape[i]
16795 : * tmpslice.suboffsets[i] = -1
16796 : */
16797 0 : __pyx_t_3 = __pyx_v_ndim;
16798 0 : __pyx_t_5 = __pyx_t_3;
16799 0 : for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
16800 0 : __pyx_v_i = __pyx_t_6;
16801 :
16802 : /* "View.MemoryView":1227
16803 : * tmpslice.memview = src.memview
16804 : * for i in range(ndim):
16805 : * tmpslice.shape[i] = src.shape[i] # <<<<<<<<<<<<<<
16806 : * tmpslice.suboffsets[i] = -1
16807 : *
16808 : */
16809 0 : (__pyx_v_tmpslice->shape[__pyx_v_i]) = (__pyx_v_src->shape[__pyx_v_i]);
16810 :
16811 : /* "View.MemoryView":1228
16812 : * for i in range(ndim):
16813 : * tmpslice.shape[i] = src.shape[i]
16814 : * tmpslice.suboffsets[i] = -1 # <<<<<<<<<<<<<<
16815 : *
16816 : * fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize, ndim, order)
16817 : */
16818 0 : (__pyx_v_tmpslice->suboffsets[__pyx_v_i]) = -1L;
16819 : }
16820 :
16821 : /* "View.MemoryView":1230
16822 : * tmpslice.suboffsets[i] = -1
16823 : *
16824 : * fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize, ndim, order) # <<<<<<<<<<<<<<
16825 : *
16826 : *
16827 : */
16828 0 : (void)(__pyx_fill_contig_strides_array((&(__pyx_v_tmpslice->shape[0])), (&(__pyx_v_tmpslice->strides[0])), __pyx_v_itemsize, __pyx_v_ndim, __pyx_v_order));
16829 :
16830 : /* "View.MemoryView":1233
16831 : *
16832 : *
16833 : * for i in range(ndim): # <<<<<<<<<<<<<<
16834 : * if tmpslice.shape[i] == 1:
16835 : * tmpslice.strides[i] = 0
16836 : */
16837 0 : __pyx_t_3 = __pyx_v_ndim;
16838 0 : __pyx_t_5 = __pyx_t_3;
16839 0 : for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
16840 0 : __pyx_v_i = __pyx_t_6;
16841 :
16842 : /* "View.MemoryView":1234
16843 : *
16844 : * for i in range(ndim):
16845 : * if tmpslice.shape[i] == 1: # <<<<<<<<<<<<<<
16846 : * tmpslice.strides[i] = 0
16847 : *
16848 : */
16849 0 : __pyx_t_2 = ((__pyx_v_tmpslice->shape[__pyx_v_i]) == 1);
16850 0 : if (__pyx_t_2) {
16851 :
16852 : /* "View.MemoryView":1235
16853 : * for i in range(ndim):
16854 : * if tmpslice.shape[i] == 1:
16855 : * tmpslice.strides[i] = 0 # <<<<<<<<<<<<<<
16856 : *
16857 : * if slice_is_contig(src[0], order, ndim):
16858 : */
16859 0 : (__pyx_v_tmpslice->strides[__pyx_v_i]) = 0;
16860 :
16861 : /* "View.MemoryView":1234
16862 : *
16863 : * for i in range(ndim):
16864 : * if tmpslice.shape[i] == 1: # <<<<<<<<<<<<<<
16865 : * tmpslice.strides[i] = 0
16866 : *
16867 : */
16868 : }
16869 : }
16870 :
16871 : /* "View.MemoryView":1237
16872 : * tmpslice.strides[i] = 0
16873 : *
16874 : * if slice_is_contig(src[0], order, ndim): # <<<<<<<<<<<<<<
16875 : * memcpy(result, src.data, size)
16876 : * else:
16877 : */
16878 0 : __pyx_t_2 = __pyx_memviewslice_is_contig((__pyx_v_src[0]), __pyx_v_order, __pyx_v_ndim);
16879 0 : if (__pyx_t_2) {
16880 :
16881 : /* "View.MemoryView":1238
16882 : *
16883 : * if slice_is_contig(src[0], order, ndim):
16884 : * memcpy(result, src.data, size) # <<<<<<<<<<<<<<
16885 : * else:
16886 : * copy_strided_to_strided(src, tmpslice, ndim, itemsize)
16887 : */
16888 0 : (void)(memcpy(__pyx_v_result, __pyx_v_src->data, __pyx_v_size));
16889 :
16890 : /* "View.MemoryView":1237
16891 : * tmpslice.strides[i] = 0
16892 : *
16893 : * if slice_is_contig(src[0], order, ndim): # <<<<<<<<<<<<<<
16894 : * memcpy(result, src.data, size)
16895 : * else:
16896 : */
16897 0 : goto __pyx_L9;
16898 : }
16899 :
16900 : /* "View.MemoryView":1240
16901 : * memcpy(result, src.data, size)
16902 : * else:
16903 : * copy_strided_to_strided(src, tmpslice, ndim, itemsize) # <<<<<<<<<<<<<<
16904 : *
16905 : * return result
16906 : */
16907 : /*else*/ {
16908 0 : copy_strided_to_strided(__pyx_v_src, __pyx_v_tmpslice, __pyx_v_ndim, __pyx_v_itemsize);
16909 : }
16910 0 : __pyx_L9:;
16911 :
16912 : /* "View.MemoryView":1242
16913 : * copy_strided_to_strided(src, tmpslice, ndim, itemsize)
16914 : *
16915 : * return result # <<<<<<<<<<<<<<
16916 : *
16917 : *
16918 : */
16919 0 : __pyx_r = __pyx_v_result;
16920 0 : goto __pyx_L0;
16921 :
16922 : /* "View.MemoryView":1205
16923 : *
16924 : * @cname('__pyx_memoryview_copy_data_to_temp')
16925 : * cdef void *copy_data_to_temp(__Pyx_memviewslice *src, # <<<<<<<<<<<<<<
16926 : * __Pyx_memviewslice *tmpslice,
16927 : * char order,
16928 : */
16929 :
16930 : /* function exit code */
16931 0 : __pyx_L1_error:;
16932 : #ifdef WITH_THREAD
16933 0 : __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
16934 : #endif
16935 0 : __Pyx_AddTraceback("View.MemoryView.copy_data_to_temp", __pyx_clineno, __pyx_lineno, __pyx_filename);
16936 0 : __pyx_r = NULL;
16937 : #ifdef WITH_THREAD
16938 0 : __Pyx_PyGILState_Release(__pyx_gilstate_save);
16939 : #endif
16940 0 : __pyx_L0:;
16941 0 : return __pyx_r;
16942 : }
16943 :
16944 : /* "View.MemoryView":1247
16945 : *
16946 : * @cname('__pyx_memoryview_err_extents')
16947 : * cdef int _err_extents(int i, Py_ssize_t extent1, # <<<<<<<<<<<<<<
16948 : * Py_ssize_t extent2) except -1 with gil:
16949 : * raise ValueError, f"got differing extents in dimension {i} (got {extent1} and {extent2})"
16950 : */
16951 :
16952 0 : static int __pyx_memoryview_err_extents(int __pyx_v_i, Py_ssize_t __pyx_v_extent1, Py_ssize_t __pyx_v_extent2) {
16953 0 : int __pyx_r;
16954 : __Pyx_RefNannyDeclarations
16955 0 : PyObject *__pyx_t_1 = NULL;
16956 0 : Py_ssize_t __pyx_t_2;
16957 0 : Py_UCS4 __pyx_t_3;
16958 0 : PyObject *__pyx_t_4 = NULL;
16959 0 : int __pyx_lineno = 0;
16960 0 : const char *__pyx_filename = NULL;
16961 0 : int __pyx_clineno = 0;
16962 : #ifdef WITH_THREAD
16963 0 : PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
16964 : #endif
16965 0 : __Pyx_RefNannySetupContext("_err_extents", 0);
16966 :
16967 : /* "View.MemoryView":1249
16968 : * cdef int _err_extents(int i, Py_ssize_t extent1,
16969 : * Py_ssize_t extent2) except -1 with gil:
16970 : * raise ValueError, f"got differing extents in dimension {i} (got {extent1} and {extent2})" # <<<<<<<<<<<<<<
16971 : *
16972 : * @cname('__pyx_memoryview_err_dim')
16973 : */
16974 0 : __pyx_t_1 = PyTuple_New(7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1249, __pyx_L1_error)
16975 0 : __Pyx_GOTREF(__pyx_t_1);
16976 0 : __pyx_t_2 = 0;
16977 0 : __pyx_t_3 = 127;
16978 0 : __Pyx_INCREF(__pyx_kp_u_got_differing_extents_in_dimensi);
16979 0 : __pyx_t_2 += 35;
16980 0 : __Pyx_GIVEREF(__pyx_kp_u_got_differing_extents_in_dimensi);
16981 0 : PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_got_differing_extents_in_dimensi);
16982 0 : __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v_i, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1249, __pyx_L1_error)
16983 0 : __Pyx_GOTREF(__pyx_t_4);
16984 0 : __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
16985 0 : __Pyx_GIVEREF(__pyx_t_4);
16986 0 : PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4);
16987 0 : __pyx_t_4 = 0;
16988 0 : __Pyx_INCREF(__pyx_kp_u_got);
16989 0 : __pyx_t_2 += 6;
16990 0 : __Pyx_GIVEREF(__pyx_kp_u_got);
16991 0 : PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_got);
16992 0 : __pyx_t_4 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_extent1, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1249, __pyx_L1_error)
16993 0 : __Pyx_GOTREF(__pyx_t_4);
16994 0 : __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
16995 0 : __Pyx_GIVEREF(__pyx_t_4);
16996 0 : PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_4);
16997 0 : __pyx_t_4 = 0;
16998 0 : __Pyx_INCREF(__pyx_kp_u_and);
16999 0 : __pyx_t_2 += 5;
17000 0 : __Pyx_GIVEREF(__pyx_kp_u_and);
17001 0 : PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u_and);
17002 0 : __pyx_t_4 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_extent2, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1249, __pyx_L1_error)
17003 0 : __Pyx_GOTREF(__pyx_t_4);
17004 0 : __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
17005 0 : __Pyx_GIVEREF(__pyx_t_4);
17006 0 : PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_t_4);
17007 0 : __pyx_t_4 = 0;
17008 0 : __Pyx_INCREF(__pyx_kp_u__7);
17009 0 : __pyx_t_2 += 1;
17010 0 : __Pyx_GIVEREF(__pyx_kp_u__7);
17011 0 : PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_kp_u__7);
17012 0 : __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 7, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1249, __pyx_L1_error)
17013 0 : __Pyx_GOTREF(__pyx_t_4);
17014 0 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17015 0 : __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_4, 0, 0);
17016 0 : __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17017 0 : __PYX_ERR(1, 1249, __pyx_L1_error)
17018 :
17019 : /* "View.MemoryView":1247
17020 : *
17021 : * @cname('__pyx_memoryview_err_extents')
17022 : * cdef int _err_extents(int i, Py_ssize_t extent1, # <<<<<<<<<<<<<<
17023 : * Py_ssize_t extent2) except -1 with gil:
17024 : * raise ValueError, f"got differing extents in dimension {i} (got {extent1} and {extent2})"
17025 : */
17026 :
17027 : /* function exit code */
17028 0 : __pyx_L1_error:;
17029 0 : __Pyx_XDECREF(__pyx_t_1);
17030 0 : __Pyx_XDECREF(__pyx_t_4);
17031 0 : __Pyx_AddTraceback("View.MemoryView._err_extents", __pyx_clineno, __pyx_lineno, __pyx_filename);
17032 0 : __pyx_r = -1;
17033 0 : __Pyx_RefNannyFinishContext();
17034 : #ifdef WITH_THREAD
17035 0 : __Pyx_PyGILState_Release(__pyx_gilstate_save);
17036 : #endif
17037 0 : return __pyx_r;
17038 : }
17039 :
17040 : /* "View.MemoryView":1252
17041 : *
17042 : * @cname('__pyx_memoryview_err_dim')
17043 : * cdef int _err_dim(PyObject *error, str msg, int dim) except -1 with gil: # <<<<<<<<<<<<<<
17044 : * raise <object>error, msg % dim
17045 : *
17046 : */
17047 :
17048 0 : static int __pyx_memoryview_err_dim(PyObject *__pyx_v_error, PyObject *__pyx_v_msg, int __pyx_v_dim) {
17049 0 : int __pyx_r;
17050 : __Pyx_RefNannyDeclarations
17051 0 : PyObject *__pyx_t_1 = NULL;
17052 0 : PyObject *__pyx_t_2 = NULL;
17053 0 : int __pyx_lineno = 0;
17054 0 : const char *__pyx_filename = NULL;
17055 0 : int __pyx_clineno = 0;
17056 : #ifdef WITH_THREAD
17057 0 : PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
17058 : #endif
17059 0 : __Pyx_RefNannySetupContext("_err_dim", 0);
17060 0 : __Pyx_INCREF(__pyx_v_msg);
17061 :
17062 : /* "View.MemoryView":1253
17063 : * @cname('__pyx_memoryview_err_dim')
17064 : * cdef int _err_dim(PyObject *error, str msg, int dim) except -1 with gil:
17065 : * raise <object>error, msg % dim # <<<<<<<<<<<<<<
17066 : *
17067 : * @cname('__pyx_memoryview_err')
17068 : */
17069 0 : __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_dim); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1253, __pyx_L1_error)
17070 0 : __Pyx_GOTREF(__pyx_t_1);
17071 0 : __pyx_t_2 = __Pyx_PyString_FormatSafe(__pyx_v_msg, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1253, __pyx_L1_error)
17072 0 : __Pyx_GOTREF(__pyx_t_2);
17073 0 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17074 0 : __Pyx_Raise(((PyObject *)__pyx_v_error), __pyx_t_2, 0, 0);
17075 0 : __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17076 0 : __PYX_ERR(1, 1253, __pyx_L1_error)
17077 :
17078 : /* "View.MemoryView":1252
17079 : *
17080 : * @cname('__pyx_memoryview_err_dim')
17081 : * cdef int _err_dim(PyObject *error, str msg, int dim) except -1 with gil: # <<<<<<<<<<<<<<
17082 : * raise <object>error, msg % dim
17083 : *
17084 : */
17085 :
17086 : /* function exit code */
17087 0 : __pyx_L1_error:;
17088 0 : __Pyx_XDECREF(__pyx_t_1);
17089 0 : __Pyx_XDECREF(__pyx_t_2);
17090 0 : __Pyx_AddTraceback("View.MemoryView._err_dim", __pyx_clineno, __pyx_lineno, __pyx_filename);
17091 0 : __pyx_r = -1;
17092 0 : __Pyx_XDECREF(__pyx_v_msg);
17093 0 : __Pyx_RefNannyFinishContext();
17094 : #ifdef WITH_THREAD
17095 0 : __Pyx_PyGILState_Release(__pyx_gilstate_save);
17096 : #endif
17097 0 : return __pyx_r;
17098 : }
17099 :
17100 : /* "View.MemoryView":1256
17101 : *
17102 : * @cname('__pyx_memoryview_err')
17103 : * cdef int _err(PyObject *error, str msg) except -1 with gil: # <<<<<<<<<<<<<<
17104 : * raise <object>error, msg
17105 : *
17106 : */
17107 :
17108 0 : static int __pyx_memoryview_err(PyObject *__pyx_v_error, PyObject *__pyx_v_msg) {
17109 0 : int __pyx_r;
17110 : __Pyx_RefNannyDeclarations
17111 0 : int __pyx_lineno = 0;
17112 0 : const char *__pyx_filename = NULL;
17113 0 : int __pyx_clineno = 0;
17114 : #ifdef WITH_THREAD
17115 0 : PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
17116 : #endif
17117 0 : __Pyx_RefNannySetupContext("_err", 0);
17118 0 : __Pyx_INCREF(__pyx_v_msg);
17119 :
17120 : /* "View.MemoryView":1257
17121 : * @cname('__pyx_memoryview_err')
17122 : * cdef int _err(PyObject *error, str msg) except -1 with gil:
17123 : * raise <object>error, msg # <<<<<<<<<<<<<<
17124 : *
17125 : * @cname('__pyx_memoryview_err_no_memory')
17126 : */
17127 0 : __Pyx_Raise(((PyObject *)__pyx_v_error), __pyx_v_msg, 0, 0);
17128 0 : __PYX_ERR(1, 1257, __pyx_L1_error)
17129 :
17130 : /* "View.MemoryView":1256
17131 : *
17132 : * @cname('__pyx_memoryview_err')
17133 : * cdef int _err(PyObject *error, str msg) except -1 with gil: # <<<<<<<<<<<<<<
17134 : * raise <object>error, msg
17135 : *
17136 : */
17137 :
17138 : /* function exit code */
17139 0 : __pyx_L1_error:;
17140 0 : __Pyx_AddTraceback("View.MemoryView._err", __pyx_clineno, __pyx_lineno, __pyx_filename);
17141 0 : __pyx_r = -1;
17142 0 : __Pyx_XDECREF(__pyx_v_msg);
17143 0 : __Pyx_RefNannyFinishContext();
17144 : #ifdef WITH_THREAD
17145 0 : __Pyx_PyGILState_Release(__pyx_gilstate_save);
17146 : #endif
17147 0 : return __pyx_r;
17148 : }
17149 :
17150 : /* "View.MemoryView":1260
17151 : *
17152 : * @cname('__pyx_memoryview_err_no_memory')
17153 : * cdef int _err_no_memory() except -1 with gil: # <<<<<<<<<<<<<<
17154 : * raise MemoryError
17155 : *
17156 : */
17157 :
17158 0 : static int __pyx_memoryview_err_no_memory(void) {
17159 0 : int __pyx_r;
17160 0 : int __pyx_lineno = 0;
17161 0 : const char *__pyx_filename = NULL;
17162 0 : int __pyx_clineno = 0;
17163 : #ifdef WITH_THREAD
17164 0 : PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
17165 : #endif
17166 :
17167 : /* "View.MemoryView":1261
17168 : * @cname('__pyx_memoryview_err_no_memory')
17169 : * cdef int _err_no_memory() except -1 with gil:
17170 : * raise MemoryError # <<<<<<<<<<<<<<
17171 : *
17172 : *
17173 : */
17174 0 : PyErr_NoMemory(); __PYX_ERR(1, 1261, __pyx_L1_error)
17175 :
17176 : /* "View.MemoryView":1260
17177 : *
17178 : * @cname('__pyx_memoryview_err_no_memory')
17179 : * cdef int _err_no_memory() except -1 with gil: # <<<<<<<<<<<<<<
17180 : * raise MemoryError
17181 : *
17182 : */
17183 :
17184 : /* function exit code */
17185 0 : __pyx_L1_error:;
17186 0 : __Pyx_AddTraceback("View.MemoryView._err_no_memory", __pyx_clineno, __pyx_lineno, __pyx_filename);
17187 0 : __pyx_r = -1;
17188 : #ifdef WITH_THREAD
17189 0 : __Pyx_PyGILState_Release(__pyx_gilstate_save);
17190 : #endif
17191 0 : return __pyx_r;
17192 : }
17193 :
17194 : /* "View.MemoryView":1265
17195 : *
17196 : * @cname('__pyx_memoryview_copy_contents')
17197 : * cdef int memoryview_copy_contents(__Pyx_memviewslice src, # <<<<<<<<<<<<<<
17198 : * __Pyx_memviewslice dst,
17199 : * int src_ndim, int dst_ndim,
17200 : */
17201 :
17202 1752 : static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_memviewslice __pyx_v_dst, int __pyx_v_src_ndim, int __pyx_v_dst_ndim, int __pyx_v_dtype_is_object) {
17203 1752 : void *__pyx_v_tmpdata;
17204 1752 : size_t __pyx_v_itemsize;
17205 1752 : int __pyx_v_i;
17206 1752 : char __pyx_v_order;
17207 1752 : int __pyx_v_broadcasting;
17208 1752 : int __pyx_v_direct_copy;
17209 1752 : __Pyx_memviewslice __pyx_v_tmp;
17210 1752 : int __pyx_v_ndim;
17211 1752 : int __pyx_r;
17212 1752 : Py_ssize_t __pyx_t_1;
17213 1752 : int __pyx_t_2;
17214 1752 : int __pyx_t_3;
17215 1752 : int __pyx_t_4;
17216 1752 : int __pyx_t_5;
17217 1752 : int __pyx_t_6;
17218 1752 : void *__pyx_t_7;
17219 1752 : int __pyx_lineno = 0;
17220 1752 : const char *__pyx_filename = NULL;
17221 1752 : int __pyx_clineno = 0;
17222 : #ifdef WITH_THREAD
17223 1752 : PyGILState_STATE __pyx_gilstate_save;
17224 : #endif
17225 :
17226 : /* "View.MemoryView":1273
17227 : * Check for overlapping memory and verify the shapes.
17228 : * """
17229 : * cdef void *tmpdata = NULL # <<<<<<<<<<<<<<
17230 : * cdef size_t itemsize = src.memview.view.itemsize
17231 : * cdef int i
17232 : */
17233 1752 : __pyx_v_tmpdata = NULL;
17234 :
17235 : /* "View.MemoryView":1274
17236 : * """
17237 : * cdef void *tmpdata = NULL
17238 : * cdef size_t itemsize = src.memview.view.itemsize # <<<<<<<<<<<<<<
17239 : * cdef int i
17240 : * cdef char order = get_best_order(&src, src_ndim)
17241 : */
17242 1752 : __pyx_t_1 = __pyx_v_src.memview->view.itemsize;
17243 1752 : __pyx_v_itemsize = __pyx_t_1;
17244 :
17245 : /* "View.MemoryView":1276
17246 : * cdef size_t itemsize = src.memview.view.itemsize
17247 : * cdef int i
17248 : * cdef char order = get_best_order(&src, src_ndim) # <<<<<<<<<<<<<<
17249 : * cdef bint broadcasting = False
17250 : * cdef bint direct_copy = False
17251 : */
17252 1752 : __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_src), __pyx_v_src_ndim);
17253 :
17254 : /* "View.MemoryView":1277
17255 : * cdef int i
17256 : * cdef char order = get_best_order(&src, src_ndim)
17257 : * cdef bint broadcasting = False # <<<<<<<<<<<<<<
17258 : * cdef bint direct_copy = False
17259 : * cdef __Pyx_memviewslice tmp
17260 : */
17261 1752 : __pyx_v_broadcasting = 0;
17262 :
17263 : /* "View.MemoryView":1278
17264 : * cdef char order = get_best_order(&src, src_ndim)
17265 : * cdef bint broadcasting = False
17266 : * cdef bint direct_copy = False # <<<<<<<<<<<<<<
17267 : * cdef __Pyx_memviewslice tmp
17268 : *
17269 : */
17270 1752 : __pyx_v_direct_copy = 0;
17271 :
17272 : /* "View.MemoryView":1281
17273 : * cdef __Pyx_memviewslice tmp
17274 : *
17275 : * if src_ndim < dst_ndim: # <<<<<<<<<<<<<<
17276 : * broadcast_leading(&src, src_ndim, dst_ndim)
17277 : * elif dst_ndim < src_ndim:
17278 : */
17279 1752 : __pyx_t_2 = (__pyx_v_src_ndim < __pyx_v_dst_ndim);
17280 1752 : if (__pyx_t_2) {
17281 :
17282 : /* "View.MemoryView":1282
17283 : *
17284 : * if src_ndim < dst_ndim:
17285 : * broadcast_leading(&src, src_ndim, dst_ndim) # <<<<<<<<<<<<<<
17286 : * elif dst_ndim < src_ndim:
17287 : * broadcast_leading(&dst, dst_ndim, src_ndim)
17288 : */
17289 0 : __pyx_memoryview_broadcast_leading((&__pyx_v_src), __pyx_v_src_ndim, __pyx_v_dst_ndim);
17290 :
17291 : /* "View.MemoryView":1281
17292 : * cdef __Pyx_memviewslice tmp
17293 : *
17294 : * if src_ndim < dst_ndim: # <<<<<<<<<<<<<<
17295 : * broadcast_leading(&src, src_ndim, dst_ndim)
17296 : * elif dst_ndim < src_ndim:
17297 : */
17298 0 : goto __pyx_L3;
17299 : }
17300 :
17301 : /* "View.MemoryView":1283
17302 : * if src_ndim < dst_ndim:
17303 : * broadcast_leading(&src, src_ndim, dst_ndim)
17304 : * elif dst_ndim < src_ndim: # <<<<<<<<<<<<<<
17305 : * broadcast_leading(&dst, dst_ndim, src_ndim)
17306 : *
17307 : */
17308 1752 : __pyx_t_2 = (__pyx_v_dst_ndim < __pyx_v_src_ndim);
17309 1752 : if (__pyx_t_2) {
17310 :
17311 : /* "View.MemoryView":1284
17312 : * broadcast_leading(&src, src_ndim, dst_ndim)
17313 : * elif dst_ndim < src_ndim:
17314 : * broadcast_leading(&dst, dst_ndim, src_ndim) # <<<<<<<<<<<<<<
17315 : *
17316 : * cdef int ndim = max(src_ndim, dst_ndim)
17317 : */
17318 0 : __pyx_memoryview_broadcast_leading((&__pyx_v_dst), __pyx_v_dst_ndim, __pyx_v_src_ndim);
17319 :
17320 : /* "View.MemoryView":1283
17321 : * if src_ndim < dst_ndim:
17322 : * broadcast_leading(&src, src_ndim, dst_ndim)
17323 : * elif dst_ndim < src_ndim: # <<<<<<<<<<<<<<
17324 : * broadcast_leading(&dst, dst_ndim, src_ndim)
17325 : *
17326 : */
17327 : }
17328 1752 : __pyx_L3:;
17329 :
17330 : /* "View.MemoryView":1286
17331 : * broadcast_leading(&dst, dst_ndim, src_ndim)
17332 : *
17333 : * cdef int ndim = max(src_ndim, dst_ndim) # <<<<<<<<<<<<<<
17334 : *
17335 : * for i in range(ndim):
17336 : */
17337 1752 : __pyx_t_3 = __pyx_v_dst_ndim;
17338 1752 : __pyx_t_4 = __pyx_v_src_ndim;
17339 1752 : __pyx_t_2 = (__pyx_t_3 > __pyx_t_4);
17340 1752 : if (__pyx_t_2) {
17341 : __pyx_t_5 = __pyx_t_3;
17342 : } else {
17343 : __pyx_t_5 = __pyx_t_4;
17344 : }
17345 1752 : __pyx_v_ndim = __pyx_t_5;
17346 :
17347 : /* "View.MemoryView":1288
17348 : * cdef int ndim = max(src_ndim, dst_ndim)
17349 : *
17350 : * for i in range(ndim): # <<<<<<<<<<<<<<
17351 : * if src.shape[i] != dst.shape[i]:
17352 : * if src.shape[i] == 1:
17353 : */
17354 1752 : __pyx_t_5 = __pyx_v_ndim;
17355 1752 : __pyx_t_3 = __pyx_t_5;
17356 3504 : for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
17357 1752 : __pyx_v_i = __pyx_t_4;
17358 :
17359 : /* "View.MemoryView":1289
17360 : *
17361 : * for i in range(ndim):
17362 : * if src.shape[i] != dst.shape[i]: # <<<<<<<<<<<<<<
17363 : * if src.shape[i] == 1:
17364 : * broadcasting = True
17365 : */
17366 1752 : __pyx_t_2 = ((__pyx_v_src.shape[__pyx_v_i]) != (__pyx_v_dst.shape[__pyx_v_i]));
17367 1752 : if (__pyx_t_2) {
17368 :
17369 : /* "View.MemoryView":1290
17370 : * for i in range(ndim):
17371 : * if src.shape[i] != dst.shape[i]:
17372 : * if src.shape[i] == 1: # <<<<<<<<<<<<<<
17373 : * broadcasting = True
17374 : * src.strides[i] = 0
17375 : */
17376 0 : __pyx_t_2 = ((__pyx_v_src.shape[__pyx_v_i]) == 1);
17377 0 : if (__pyx_t_2) {
17378 :
17379 : /* "View.MemoryView":1291
17380 : * if src.shape[i] != dst.shape[i]:
17381 : * if src.shape[i] == 1:
17382 : * broadcasting = True # <<<<<<<<<<<<<<
17383 : * src.strides[i] = 0
17384 : * else:
17385 : */
17386 0 : __pyx_v_broadcasting = 1;
17387 :
17388 : /* "View.MemoryView":1292
17389 : * if src.shape[i] == 1:
17390 : * broadcasting = True
17391 : * src.strides[i] = 0 # <<<<<<<<<<<<<<
17392 : * else:
17393 : * _err_extents(i, dst.shape[i], src.shape[i])
17394 : */
17395 0 : (__pyx_v_src.strides[__pyx_v_i]) = 0;
17396 :
17397 : /* "View.MemoryView":1290
17398 : * for i in range(ndim):
17399 : * if src.shape[i] != dst.shape[i]:
17400 : * if src.shape[i] == 1: # <<<<<<<<<<<<<<
17401 : * broadcasting = True
17402 : * src.strides[i] = 0
17403 : */
17404 0 : goto __pyx_L7;
17405 : }
17406 :
17407 : /* "View.MemoryView":1294
17408 : * src.strides[i] = 0
17409 : * else:
17410 : * _err_extents(i, dst.shape[i], src.shape[i]) # <<<<<<<<<<<<<<
17411 : *
17412 : * if src.suboffsets[i] >= 0:
17413 : */
17414 : /*else*/ {
17415 0 : __pyx_t_6 = __pyx_memoryview_err_extents(__pyx_v_i, (__pyx_v_dst.shape[__pyx_v_i]), (__pyx_v_src.shape[__pyx_v_i])); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 1294, __pyx_L1_error)
17416 : }
17417 0 : __pyx_L7:;
17418 :
17419 : /* "View.MemoryView":1289
17420 : *
17421 : * for i in range(ndim):
17422 : * if src.shape[i] != dst.shape[i]: # <<<<<<<<<<<<<<
17423 : * if src.shape[i] == 1:
17424 : * broadcasting = True
17425 : */
17426 : }
17427 :
17428 : /* "View.MemoryView":1296
17429 : * _err_extents(i, dst.shape[i], src.shape[i])
17430 : *
17431 : * if src.suboffsets[i] >= 0: # <<<<<<<<<<<<<<
17432 : * _err_dim(PyExc_ValueError, "Dimension %d is not direct", i)
17433 : *
17434 : */
17435 1752 : __pyx_t_2 = ((__pyx_v_src.suboffsets[__pyx_v_i]) >= 0);
17436 1752 : if (__pyx_t_2) {
17437 :
17438 : /* "View.MemoryView":1297
17439 : *
17440 : * if src.suboffsets[i] >= 0:
17441 : * _err_dim(PyExc_ValueError, "Dimension %d is not direct", i) # <<<<<<<<<<<<<<
17442 : *
17443 : * if slices_overlap(&src, &dst, ndim, itemsize):
17444 : */
17445 0 : __pyx_t_6 = __pyx_memoryview_err_dim(PyExc_ValueError, __pyx_kp_s_Dimension_d_is_not_direct, __pyx_v_i); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 1297, __pyx_L1_error)
17446 :
17447 : /* "View.MemoryView":1296
17448 : * _err_extents(i, dst.shape[i], src.shape[i])
17449 : *
17450 : * if src.suboffsets[i] >= 0: # <<<<<<<<<<<<<<
17451 : * _err_dim(PyExc_ValueError, "Dimension %d is not direct", i)
17452 : *
17453 : */
17454 : }
17455 : }
17456 :
17457 : /* "View.MemoryView":1299
17458 : * _err_dim(PyExc_ValueError, "Dimension %d is not direct", i)
17459 : *
17460 : * if slices_overlap(&src, &dst, ndim, itemsize): # <<<<<<<<<<<<<<
17461 : *
17462 : * if not slice_is_contig(src, order, ndim):
17463 : */
17464 1752 : __pyx_t_2 = __pyx_slices_overlap((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize);
17465 1752 : if (__pyx_t_2) {
17466 :
17467 : /* "View.MemoryView":1301
17468 : * if slices_overlap(&src, &dst, ndim, itemsize):
17469 : *
17470 : * if not slice_is_contig(src, order, ndim): # <<<<<<<<<<<<<<
17471 : * order = get_best_order(&dst, ndim)
17472 : *
17473 : */
17474 0 : __pyx_t_2 = (!__pyx_memviewslice_is_contig(__pyx_v_src, __pyx_v_order, __pyx_v_ndim));
17475 0 : if (__pyx_t_2) {
17476 :
17477 : /* "View.MemoryView":1302
17478 : *
17479 : * if not slice_is_contig(src, order, ndim):
17480 : * order = get_best_order(&dst, ndim) # <<<<<<<<<<<<<<
17481 : *
17482 : * tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)
17483 : */
17484 0 : __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim);
17485 :
17486 : /* "View.MemoryView":1301
17487 : * if slices_overlap(&src, &dst, ndim, itemsize):
17488 : *
17489 : * if not slice_is_contig(src, order, ndim): # <<<<<<<<<<<<<<
17490 : * order = get_best_order(&dst, ndim)
17491 : *
17492 : */
17493 : }
17494 :
17495 : /* "View.MemoryView":1304
17496 : * order = get_best_order(&dst, ndim)
17497 : *
17498 : * tmpdata = copy_data_to_temp(&src, &tmp, order, ndim) # <<<<<<<<<<<<<<
17499 : * src = tmp
17500 : *
17501 : */
17502 0 : __pyx_t_7 = __pyx_memoryview_copy_data_to_temp((&__pyx_v_src), (&__pyx_v_tmp), __pyx_v_order, __pyx_v_ndim); if (unlikely(__pyx_t_7 == ((void *)NULL))) __PYX_ERR(1, 1304, __pyx_L1_error)
17503 0 : __pyx_v_tmpdata = __pyx_t_7;
17504 :
17505 : /* "View.MemoryView":1305
17506 : *
17507 : * tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)
17508 : * src = tmp # <<<<<<<<<<<<<<
17509 : *
17510 : * if not broadcasting:
17511 : */
17512 0 : __pyx_v_src = __pyx_v_tmp;
17513 :
17514 : /* "View.MemoryView":1299
17515 : * _err_dim(PyExc_ValueError, "Dimension %d is not direct", i)
17516 : *
17517 : * if slices_overlap(&src, &dst, ndim, itemsize): # <<<<<<<<<<<<<<
17518 : *
17519 : * if not slice_is_contig(src, order, ndim):
17520 : */
17521 : }
17522 :
17523 : /* "View.MemoryView":1307
17524 : * src = tmp
17525 : *
17526 : * if not broadcasting: # <<<<<<<<<<<<<<
17527 : *
17528 : *
17529 : */
17530 1752 : __pyx_t_2 = (!__pyx_v_broadcasting);
17531 1752 : if (__pyx_t_2) {
17532 :
17533 : /* "View.MemoryView":1310
17534 : *
17535 : *
17536 : * if slice_is_contig(src, 'C', ndim): # <<<<<<<<<<<<<<
17537 : * direct_copy = slice_is_contig(dst, 'C', ndim)
17538 : * elif slice_is_contig(src, 'F', ndim):
17539 : */
17540 1752 : __pyx_t_2 = __pyx_memviewslice_is_contig(__pyx_v_src, 'C', __pyx_v_ndim);
17541 1752 : if (__pyx_t_2) {
17542 :
17543 : /* "View.MemoryView":1311
17544 : *
17545 : * if slice_is_contig(src, 'C', ndim):
17546 : * direct_copy = slice_is_contig(dst, 'C', ndim) # <<<<<<<<<<<<<<
17547 : * elif slice_is_contig(src, 'F', ndim):
17548 : * direct_copy = slice_is_contig(dst, 'F', ndim)
17549 : */
17550 1752 : __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'C', __pyx_v_ndim);
17551 :
17552 : /* "View.MemoryView":1310
17553 : *
17554 : *
17555 : * if slice_is_contig(src, 'C', ndim): # <<<<<<<<<<<<<<
17556 : * direct_copy = slice_is_contig(dst, 'C', ndim)
17557 : * elif slice_is_contig(src, 'F', ndim):
17558 : */
17559 1752 : goto __pyx_L12;
17560 : }
17561 :
17562 : /* "View.MemoryView":1312
17563 : * if slice_is_contig(src, 'C', ndim):
17564 : * direct_copy = slice_is_contig(dst, 'C', ndim)
17565 : * elif slice_is_contig(src, 'F', ndim): # <<<<<<<<<<<<<<
17566 : * direct_copy = slice_is_contig(dst, 'F', ndim)
17567 : *
17568 : */
17569 0 : __pyx_t_2 = __pyx_memviewslice_is_contig(__pyx_v_src, 'F', __pyx_v_ndim);
17570 0 : if (__pyx_t_2) {
17571 :
17572 : /* "View.MemoryView":1313
17573 : * direct_copy = slice_is_contig(dst, 'C', ndim)
17574 : * elif slice_is_contig(src, 'F', ndim):
17575 : * direct_copy = slice_is_contig(dst, 'F', ndim) # <<<<<<<<<<<<<<
17576 : *
17577 : * if direct_copy:
17578 : */
17579 0 : __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'F', __pyx_v_ndim);
17580 :
17581 : /* "View.MemoryView":1312
17582 : * if slice_is_contig(src, 'C', ndim):
17583 : * direct_copy = slice_is_contig(dst, 'C', ndim)
17584 : * elif slice_is_contig(src, 'F', ndim): # <<<<<<<<<<<<<<
17585 : * direct_copy = slice_is_contig(dst, 'F', ndim)
17586 : *
17587 : */
17588 : }
17589 1752 : __pyx_L12:;
17590 :
17591 : /* "View.MemoryView":1315
17592 : * direct_copy = slice_is_contig(dst, 'F', ndim)
17593 : *
17594 : * if direct_copy: # <<<<<<<<<<<<<<
17595 : *
17596 : * refcount_copying(&dst, dtype_is_object, ndim, inc=False)
17597 : */
17598 1752 : if (__pyx_v_direct_copy) {
17599 :
17600 : /* "View.MemoryView":1317
17601 : * if direct_copy:
17602 : *
17603 : * refcount_copying(&dst, dtype_is_object, ndim, inc=False) # <<<<<<<<<<<<<<
17604 : * memcpy(dst.data, src.data, slice_get_size(&src, ndim))
17605 : * refcount_copying(&dst, dtype_is_object, ndim, inc=True)
17606 : */
17607 1752 : __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
17608 :
17609 : /* "View.MemoryView":1318
17610 : *
17611 : * refcount_copying(&dst, dtype_is_object, ndim, inc=False)
17612 : * memcpy(dst.data, src.data, slice_get_size(&src, ndim)) # <<<<<<<<<<<<<<
17613 : * refcount_copying(&dst, dtype_is_object, ndim, inc=True)
17614 : * free(tmpdata)
17615 : */
17616 3504 : (void)(memcpy(__pyx_v_dst.data, __pyx_v_src.data, __pyx_memoryview_slice_get_size((&__pyx_v_src), __pyx_v_ndim)));
17617 :
17618 : /* "View.MemoryView":1319
17619 : * refcount_copying(&dst, dtype_is_object, ndim, inc=False)
17620 : * memcpy(dst.data, src.data, slice_get_size(&src, ndim))
17621 : * refcount_copying(&dst, dtype_is_object, ndim, inc=True) # <<<<<<<<<<<<<<
17622 : * free(tmpdata)
17623 : * return 0
17624 : */
17625 1752 : __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
17626 :
17627 : /* "View.MemoryView":1320
17628 : * memcpy(dst.data, src.data, slice_get_size(&src, ndim))
17629 : * refcount_copying(&dst, dtype_is_object, ndim, inc=True)
17630 : * free(tmpdata) # <<<<<<<<<<<<<<
17631 : * return 0
17632 : *
17633 : */
17634 1752 : free(__pyx_v_tmpdata);
17635 :
17636 : /* "View.MemoryView":1321
17637 : * refcount_copying(&dst, dtype_is_object, ndim, inc=True)
17638 : * free(tmpdata)
17639 : * return 0 # <<<<<<<<<<<<<<
17640 : *
17641 : * if order == 'F' == get_best_order(&dst, ndim):
17642 : */
17643 1752 : __pyx_r = 0;
17644 1752 : goto __pyx_L0;
17645 :
17646 : /* "View.MemoryView":1315
17647 : * direct_copy = slice_is_contig(dst, 'F', ndim)
17648 : *
17649 : * if direct_copy: # <<<<<<<<<<<<<<
17650 : *
17651 : * refcount_copying(&dst, dtype_is_object, ndim, inc=False)
17652 : */
17653 : }
17654 :
17655 : /* "View.MemoryView":1307
17656 : * src = tmp
17657 : *
17658 : * if not broadcasting: # <<<<<<<<<<<<<<
17659 : *
17660 : *
17661 : */
17662 : }
17663 :
17664 : /* "View.MemoryView":1323
17665 : * return 0
17666 : *
17667 : * if order == 'F' == get_best_order(&dst, ndim): # <<<<<<<<<<<<<<
17668 : *
17669 : *
17670 : */
17671 0 : __pyx_t_2 = (__pyx_v_order == 'F');
17672 0 : if (__pyx_t_2) {
17673 0 : __pyx_t_2 = ('F' == __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim));
17674 : }
17675 0 : if (__pyx_t_2) {
17676 :
17677 : /* "View.MemoryView":1326
17678 : *
17679 : *
17680 : * transpose_memslice(&src) # <<<<<<<<<<<<<<
17681 : * transpose_memslice(&dst)
17682 : *
17683 : */
17684 0 : __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_src)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 1326, __pyx_L1_error)
17685 :
17686 : /* "View.MemoryView":1327
17687 : *
17688 : * transpose_memslice(&src)
17689 : * transpose_memslice(&dst) # <<<<<<<<<<<<<<
17690 : *
17691 : * refcount_copying(&dst, dtype_is_object, ndim, inc=False)
17692 : */
17693 0 : __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_dst)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 1327, __pyx_L1_error)
17694 :
17695 : /* "View.MemoryView":1323
17696 : * return 0
17697 : *
17698 : * if order == 'F' == get_best_order(&dst, ndim): # <<<<<<<<<<<<<<
17699 : *
17700 : *
17701 : */
17702 : }
17703 :
17704 : /* "View.MemoryView":1329
17705 : * transpose_memslice(&dst)
17706 : *
17707 : * refcount_copying(&dst, dtype_is_object, ndim, inc=False) # <<<<<<<<<<<<<<
17708 : * copy_strided_to_strided(&src, &dst, ndim, itemsize)
17709 : * refcount_copying(&dst, dtype_is_object, ndim, inc=True)
17710 : */
17711 0 : __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
17712 :
17713 : /* "View.MemoryView":1330
17714 : *
17715 : * refcount_copying(&dst, dtype_is_object, ndim, inc=False)
17716 : * copy_strided_to_strided(&src, &dst, ndim, itemsize) # <<<<<<<<<<<<<<
17717 : * refcount_copying(&dst, dtype_is_object, ndim, inc=True)
17718 : *
17719 : */
17720 0 : copy_strided_to_strided((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize);
17721 :
17722 : /* "View.MemoryView":1331
17723 : * refcount_copying(&dst, dtype_is_object, ndim, inc=False)
17724 : * copy_strided_to_strided(&src, &dst, ndim, itemsize)
17725 : * refcount_copying(&dst, dtype_is_object, ndim, inc=True) # <<<<<<<<<<<<<<
17726 : *
17727 : * free(tmpdata)
17728 : */
17729 0 : __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
17730 :
17731 : /* "View.MemoryView":1333
17732 : * refcount_copying(&dst, dtype_is_object, ndim, inc=True)
17733 : *
17734 : * free(tmpdata) # <<<<<<<<<<<<<<
17735 : * return 0
17736 : *
17737 : */
17738 0 : free(__pyx_v_tmpdata);
17739 :
17740 : /* "View.MemoryView":1334
17741 : *
17742 : * free(tmpdata)
17743 : * return 0 # <<<<<<<<<<<<<<
17744 : *
17745 : * @cname('__pyx_memoryview_broadcast_leading')
17746 : */
17747 0 : __pyx_r = 0;
17748 0 : goto __pyx_L0;
17749 :
17750 : /* "View.MemoryView":1265
17751 : *
17752 : * @cname('__pyx_memoryview_copy_contents')
17753 : * cdef int memoryview_copy_contents(__Pyx_memviewslice src, # <<<<<<<<<<<<<<
17754 : * __Pyx_memviewslice dst,
17755 : * int src_ndim, int dst_ndim,
17756 : */
17757 :
17758 : /* function exit code */
17759 0 : __pyx_L1_error:;
17760 : #ifdef WITH_THREAD
17761 0 : __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
17762 : #endif
17763 0 : __Pyx_AddTraceback("View.MemoryView.memoryview_copy_contents", __pyx_clineno, __pyx_lineno, __pyx_filename);
17764 0 : __pyx_r = -1;
17765 : #ifdef WITH_THREAD
17766 0 : __Pyx_PyGILState_Release(__pyx_gilstate_save);
17767 : #endif
17768 1752 : __pyx_L0:;
17769 1752 : return __pyx_r;
17770 : }
17771 :
17772 : /* "View.MemoryView":1337
17773 : *
17774 : * @cname('__pyx_memoryview_broadcast_leading')
17775 : * cdef void broadcast_leading(__Pyx_memviewslice *mslice, # <<<<<<<<<<<<<<
17776 : * int ndim,
17777 : * int ndim_other) noexcept nogil:
17778 : */
17779 :
17780 0 : static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim, int __pyx_v_ndim_other) {
17781 0 : int __pyx_v_i;
17782 0 : int __pyx_v_offset;
17783 0 : int __pyx_t_1;
17784 0 : int __pyx_t_2;
17785 0 : int __pyx_t_3;
17786 :
17787 : /* "View.MemoryView":1341
17788 : * int ndim_other) noexcept nogil:
17789 : * cdef int i
17790 : * cdef int offset = ndim_other - ndim # <<<<<<<<<<<<<<
17791 : *
17792 : * for i in range(ndim - 1, -1, -1):
17793 : */
17794 0 : __pyx_v_offset = (__pyx_v_ndim_other - __pyx_v_ndim);
17795 :
17796 : /* "View.MemoryView":1343
17797 : * cdef int offset = ndim_other - ndim
17798 : *
17799 : * for i in range(ndim - 1, -1, -1): # <<<<<<<<<<<<<<
17800 : * mslice.shape[i + offset] = mslice.shape[i]
17801 : * mslice.strides[i + offset] = mslice.strides[i]
17802 : */
17803 0 : for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) {
17804 0 : __pyx_v_i = __pyx_t_1;
17805 :
17806 : /* "View.MemoryView":1344
17807 : *
17808 : * for i in range(ndim - 1, -1, -1):
17809 : * mslice.shape[i + offset] = mslice.shape[i] # <<<<<<<<<<<<<<
17810 : * mslice.strides[i + offset] = mslice.strides[i]
17811 : * mslice.suboffsets[i + offset] = mslice.suboffsets[i]
17812 : */
17813 0 : (__pyx_v_mslice->shape[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->shape[__pyx_v_i]);
17814 :
17815 : /* "View.MemoryView":1345
17816 : * for i in range(ndim - 1, -1, -1):
17817 : * mslice.shape[i + offset] = mslice.shape[i]
17818 : * mslice.strides[i + offset] = mslice.strides[i] # <<<<<<<<<<<<<<
17819 : * mslice.suboffsets[i + offset] = mslice.suboffsets[i]
17820 : *
17821 : */
17822 0 : (__pyx_v_mslice->strides[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->strides[__pyx_v_i]);
17823 :
17824 : /* "View.MemoryView":1346
17825 : * mslice.shape[i + offset] = mslice.shape[i]
17826 : * mslice.strides[i + offset] = mslice.strides[i]
17827 : * mslice.suboffsets[i + offset] = mslice.suboffsets[i] # <<<<<<<<<<<<<<
17828 : *
17829 : * for i in range(offset):
17830 : */
17831 0 : (__pyx_v_mslice->suboffsets[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->suboffsets[__pyx_v_i]);
17832 : }
17833 :
17834 : /* "View.MemoryView":1348
17835 : * mslice.suboffsets[i + offset] = mslice.suboffsets[i]
17836 : *
17837 : * for i in range(offset): # <<<<<<<<<<<<<<
17838 : * mslice.shape[i] = 1
17839 : * mslice.strides[i] = mslice.strides[0]
17840 : */
17841 0 : __pyx_t_1 = __pyx_v_offset;
17842 : __pyx_t_2 = __pyx_t_1;
17843 0 : for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
17844 0 : __pyx_v_i = __pyx_t_3;
17845 :
17846 : /* "View.MemoryView":1349
17847 : *
17848 : * for i in range(offset):
17849 : * mslice.shape[i] = 1 # <<<<<<<<<<<<<<
17850 : * mslice.strides[i] = mslice.strides[0]
17851 : * mslice.suboffsets[i] = -1
17852 : */
17853 0 : (__pyx_v_mslice->shape[__pyx_v_i]) = 1;
17854 :
17855 : /* "View.MemoryView":1350
17856 : * for i in range(offset):
17857 : * mslice.shape[i] = 1
17858 : * mslice.strides[i] = mslice.strides[0] # <<<<<<<<<<<<<<
17859 : * mslice.suboffsets[i] = -1
17860 : *
17861 : */
17862 0 : (__pyx_v_mslice->strides[__pyx_v_i]) = (__pyx_v_mslice->strides[0]);
17863 :
17864 : /* "View.MemoryView":1351
17865 : * mslice.shape[i] = 1
17866 : * mslice.strides[i] = mslice.strides[0]
17867 : * mslice.suboffsets[i] = -1 # <<<<<<<<<<<<<<
17868 : *
17869 : *
17870 : */
17871 0 : (__pyx_v_mslice->suboffsets[__pyx_v_i]) = -1L;
17872 : }
17873 :
17874 : /* "View.MemoryView":1337
17875 : *
17876 : * @cname('__pyx_memoryview_broadcast_leading')
17877 : * cdef void broadcast_leading(__Pyx_memviewslice *mslice, # <<<<<<<<<<<<<<
17878 : * int ndim,
17879 : * int ndim_other) noexcept nogil:
17880 : */
17881 :
17882 : /* function exit code */
17883 0 : }
17884 :
17885 : /* "View.MemoryView":1359
17886 : *
17887 : * @cname('__pyx_memoryview_refcount_copying')
17888 : * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, int ndim, bint inc) noexcept nogil: # <<<<<<<<<<<<<<
17889 : *
17890 : * if dtype_is_object:
17891 : */
17892 :
17893 3504 : static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_dtype_is_object, int __pyx_v_ndim, int __pyx_v_inc) {
17894 :
17895 : /* "View.MemoryView":1361
17896 : * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, int ndim, bint inc) noexcept nogil:
17897 : *
17898 : * if dtype_is_object: # <<<<<<<<<<<<<<
17899 : * refcount_objects_in_slice_with_gil(dst.data, dst.shape, dst.strides, ndim, inc)
17900 : *
17901 : */
17902 3504 : if (__pyx_v_dtype_is_object) {
17903 :
17904 : /* "View.MemoryView":1362
17905 : *
17906 : * if dtype_is_object:
17907 : * refcount_objects_in_slice_with_gil(dst.data, dst.shape, dst.strides, ndim, inc) # <<<<<<<<<<<<<<
17908 : *
17909 : * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')
17910 : */
17911 0 : __pyx_memoryview_refcount_objects_in_slice_with_gil(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_inc);
17912 :
17913 : /* "View.MemoryView":1361
17914 : * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, int ndim, bint inc) noexcept nogil:
17915 : *
17916 : * if dtype_is_object: # <<<<<<<<<<<<<<
17917 : * refcount_objects_in_slice_with_gil(dst.data, dst.shape, dst.strides, ndim, inc)
17918 : *
17919 : */
17920 : }
17921 :
17922 : /* "View.MemoryView":1359
17923 : *
17924 : * @cname('__pyx_memoryview_refcount_copying')
17925 : * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, int ndim, bint inc) noexcept nogil: # <<<<<<<<<<<<<<
17926 : *
17927 : * if dtype_is_object:
17928 : */
17929 :
17930 : /* function exit code */
17931 3504 : }
17932 :
17933 : /* "View.MemoryView":1365
17934 : *
17935 : * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')
17936 : * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
17937 : * Py_ssize_t *strides, int ndim,
17938 : * bint inc) noexcept with gil:
17939 : */
17940 :
17941 0 : static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) {
17942 : #ifdef WITH_THREAD
17943 0 : PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
17944 : #endif
17945 :
17946 : /* "View.MemoryView":1368
17947 : * Py_ssize_t *strides, int ndim,
17948 : * bint inc) noexcept with gil:
17949 : * refcount_objects_in_slice(data, shape, strides, ndim, inc) # <<<<<<<<<<<<<<
17950 : *
17951 : * @cname('__pyx_memoryview_refcount_objects_in_slice')
17952 : */
17953 0 : __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, __pyx_v_shape, __pyx_v_strides, __pyx_v_ndim, __pyx_v_inc);
17954 :
17955 : /* "View.MemoryView":1365
17956 : *
17957 : * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')
17958 : * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
17959 : * Py_ssize_t *strides, int ndim,
17960 : * bint inc) noexcept with gil:
17961 : */
17962 :
17963 : /* function exit code */
17964 : #ifdef WITH_THREAD
17965 0 : __Pyx_PyGILState_Release(__pyx_gilstate_save);
17966 : #endif
17967 0 : }
17968 :
17969 : /* "View.MemoryView":1371
17970 : *
17971 : * @cname('__pyx_memoryview_refcount_objects_in_slice')
17972 : * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
17973 : * Py_ssize_t *strides, int ndim, bint inc) noexcept:
17974 : * cdef Py_ssize_t i
17975 : */
17976 :
17977 0 : static void __pyx_memoryview_refcount_objects_in_slice(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) {
17978 0 : CYTHON_UNUSED Py_ssize_t __pyx_v_i;
17979 0 : Py_ssize_t __pyx_v_stride;
17980 0 : Py_ssize_t __pyx_t_1;
17981 0 : Py_ssize_t __pyx_t_2;
17982 0 : Py_ssize_t __pyx_t_3;
17983 0 : int __pyx_t_4;
17984 :
17985 : /* "View.MemoryView":1374
17986 : * Py_ssize_t *strides, int ndim, bint inc) noexcept:
17987 : * cdef Py_ssize_t i
17988 : * cdef Py_ssize_t stride = strides[0] # <<<<<<<<<<<<<<
17989 : *
17990 : * for i in range(shape[0]):
17991 : */
17992 0 : __pyx_v_stride = (__pyx_v_strides[0]);
17993 :
17994 : /* "View.MemoryView":1376
17995 : * cdef Py_ssize_t stride = strides[0]
17996 : *
17997 : * for i in range(shape[0]): # <<<<<<<<<<<<<<
17998 : * if ndim == 1:
17999 : * if inc:
18000 : */
18001 0 : __pyx_t_1 = (__pyx_v_shape[0]);
18002 0 : __pyx_t_2 = __pyx_t_1;
18003 0 : for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
18004 0 : __pyx_v_i = __pyx_t_3;
18005 :
18006 : /* "View.MemoryView":1377
18007 : *
18008 : * for i in range(shape[0]):
18009 : * if ndim == 1: # <<<<<<<<<<<<<<
18010 : * if inc:
18011 : * Py_INCREF((<PyObject **> data)[0])
18012 : */
18013 0 : __pyx_t_4 = (__pyx_v_ndim == 1);
18014 0 : if (__pyx_t_4) {
18015 :
18016 : /* "View.MemoryView":1378
18017 : * for i in range(shape[0]):
18018 : * if ndim == 1:
18019 : * if inc: # <<<<<<<<<<<<<<
18020 : * Py_INCREF((<PyObject **> data)[0])
18021 : * else:
18022 : */
18023 0 : if (__pyx_v_inc) {
18024 :
18025 : /* "View.MemoryView":1379
18026 : * if ndim == 1:
18027 : * if inc:
18028 : * Py_INCREF((<PyObject **> data)[0]) # <<<<<<<<<<<<<<
18029 : * else:
18030 : * Py_DECREF((<PyObject **> data)[0])
18031 : */
18032 0 : Py_INCREF((((PyObject **)__pyx_v_data)[0]));
18033 :
18034 : /* "View.MemoryView":1378
18035 : * for i in range(shape[0]):
18036 : * if ndim == 1:
18037 : * if inc: # <<<<<<<<<<<<<<
18038 : * Py_INCREF((<PyObject **> data)[0])
18039 : * else:
18040 : */
18041 0 : goto __pyx_L6;
18042 : }
18043 :
18044 : /* "View.MemoryView":1381
18045 : * Py_INCREF((<PyObject **> data)[0])
18046 : * else:
18047 : * Py_DECREF((<PyObject **> data)[0]) # <<<<<<<<<<<<<<
18048 : * else:
18049 : * refcount_objects_in_slice(data, shape + 1, strides + 1, ndim - 1, inc)
18050 : */
18051 : /*else*/ {
18052 0 : Py_DECREF((((PyObject **)__pyx_v_data)[0]));
18053 : }
18054 0 : __pyx_L6:;
18055 :
18056 : /* "View.MemoryView":1377
18057 : *
18058 : * for i in range(shape[0]):
18059 : * if ndim == 1: # <<<<<<<<<<<<<<
18060 : * if inc:
18061 : * Py_INCREF((<PyObject **> data)[0])
18062 : */
18063 0 : goto __pyx_L5;
18064 : }
18065 :
18066 : /* "View.MemoryView":1383
18067 : * Py_DECREF((<PyObject **> data)[0])
18068 : * else:
18069 : * refcount_objects_in_slice(data, shape + 1, strides + 1, ndim - 1, inc) # <<<<<<<<<<<<<<
18070 : *
18071 : * data += stride
18072 : */
18073 : /*else*/ {
18074 0 : __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_inc);
18075 : }
18076 0 : __pyx_L5:;
18077 :
18078 : /* "View.MemoryView":1385
18079 : * refcount_objects_in_slice(data, shape + 1, strides + 1, ndim - 1, inc)
18080 : *
18081 : * data += stride # <<<<<<<<<<<<<<
18082 : *
18083 : *
18084 : */
18085 0 : __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
18086 : }
18087 :
18088 : /* "View.MemoryView":1371
18089 : *
18090 : * @cname('__pyx_memoryview_refcount_objects_in_slice')
18091 : * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
18092 : * Py_ssize_t *strides, int ndim, bint inc) noexcept:
18093 : * cdef Py_ssize_t i
18094 : */
18095 :
18096 : /* function exit code */
18097 0 : }
18098 :
18099 : /* "View.MemoryView":1391
18100 : *
18101 : * @cname('__pyx_memoryview_slice_assign_scalar')
18102 : * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim, # <<<<<<<<<<<<<<
18103 : * size_t itemsize, void *item,
18104 : * bint dtype_is_object) noexcept nogil:
18105 : */
18106 :
18107 0 : static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item, int __pyx_v_dtype_is_object) {
18108 :
18109 : /* "View.MemoryView":1394
18110 : * size_t itemsize, void *item,
18111 : * bint dtype_is_object) noexcept nogil:
18112 : * refcount_copying(dst, dtype_is_object, ndim, inc=False) # <<<<<<<<<<<<<<
18113 : * _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, itemsize, item)
18114 : * refcount_copying(dst, dtype_is_object, ndim, inc=True)
18115 : */
18116 0 : __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
18117 :
18118 : /* "View.MemoryView":1395
18119 : * bint dtype_is_object) noexcept nogil:
18120 : * refcount_copying(dst, dtype_is_object, ndim, inc=False)
18121 : * _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, itemsize, item) # <<<<<<<<<<<<<<
18122 : * refcount_copying(dst, dtype_is_object, ndim, inc=True)
18123 : *
18124 : */
18125 0 : __pyx_memoryview__slice_assign_scalar(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_itemsize, __pyx_v_item);
18126 :
18127 : /* "View.MemoryView":1396
18128 : * refcount_copying(dst, dtype_is_object, ndim, inc=False)
18129 : * _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, itemsize, item)
18130 : * refcount_copying(dst, dtype_is_object, ndim, inc=True) # <<<<<<<<<<<<<<
18131 : *
18132 : *
18133 : */
18134 0 : __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
18135 :
18136 : /* "View.MemoryView":1391
18137 : *
18138 : * @cname('__pyx_memoryview_slice_assign_scalar')
18139 : * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim, # <<<<<<<<<<<<<<
18140 : * size_t itemsize, void *item,
18141 : * bint dtype_is_object) noexcept nogil:
18142 : */
18143 :
18144 : /* function exit code */
18145 0 : }
18146 :
18147 : /* "View.MemoryView":1400
18148 : *
18149 : * @cname('__pyx_memoryview__slice_assign_scalar')
18150 : * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
18151 : * Py_ssize_t *strides, int ndim,
18152 : * size_t itemsize, void *item) noexcept nogil:
18153 : */
18154 :
18155 0 : static void __pyx_memoryview__slice_assign_scalar(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item) {
18156 0 : CYTHON_UNUSED Py_ssize_t __pyx_v_i;
18157 0 : Py_ssize_t __pyx_v_stride;
18158 0 : Py_ssize_t __pyx_v_extent;
18159 0 : int __pyx_t_1;
18160 0 : Py_ssize_t __pyx_t_2;
18161 0 : Py_ssize_t __pyx_t_3;
18162 0 : Py_ssize_t __pyx_t_4;
18163 :
18164 : /* "View.MemoryView":1404
18165 : * size_t itemsize, void *item) noexcept nogil:
18166 : * cdef Py_ssize_t i
18167 : * cdef Py_ssize_t stride = strides[0] # <<<<<<<<<<<<<<
18168 : * cdef Py_ssize_t extent = shape[0]
18169 : *
18170 : */
18171 0 : __pyx_v_stride = (__pyx_v_strides[0]);
18172 :
18173 : /* "View.MemoryView":1405
18174 : * cdef Py_ssize_t i
18175 : * cdef Py_ssize_t stride = strides[0]
18176 : * cdef Py_ssize_t extent = shape[0] # <<<<<<<<<<<<<<
18177 : *
18178 : * if ndim == 1:
18179 : */
18180 0 : __pyx_v_extent = (__pyx_v_shape[0]);
18181 :
18182 : /* "View.MemoryView":1407
18183 : * cdef Py_ssize_t extent = shape[0]
18184 : *
18185 : * if ndim == 1: # <<<<<<<<<<<<<<
18186 : * for i in range(extent):
18187 : * memcpy(data, item, itemsize)
18188 : */
18189 0 : __pyx_t_1 = (__pyx_v_ndim == 1);
18190 0 : if (__pyx_t_1) {
18191 :
18192 : /* "View.MemoryView":1408
18193 : *
18194 : * if ndim == 1:
18195 : * for i in range(extent): # <<<<<<<<<<<<<<
18196 : * memcpy(data, item, itemsize)
18197 : * data += stride
18198 : */
18199 : __pyx_t_2 = __pyx_v_extent;
18200 : __pyx_t_3 = __pyx_t_2;
18201 0 : for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
18202 0 : __pyx_v_i = __pyx_t_4;
18203 :
18204 : /* "View.MemoryView":1409
18205 : * if ndim == 1:
18206 : * for i in range(extent):
18207 : * memcpy(data, item, itemsize) # <<<<<<<<<<<<<<
18208 : * data += stride
18209 : * else:
18210 : */
18211 0 : (void)(memcpy(__pyx_v_data, __pyx_v_item, __pyx_v_itemsize));
18212 :
18213 : /* "View.MemoryView":1410
18214 : * for i in range(extent):
18215 : * memcpy(data, item, itemsize)
18216 : * data += stride # <<<<<<<<<<<<<<
18217 : * else:
18218 : * for i in range(extent):
18219 : */
18220 0 : __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
18221 : }
18222 :
18223 : /* "View.MemoryView":1407
18224 : * cdef Py_ssize_t extent = shape[0]
18225 : *
18226 : * if ndim == 1: # <<<<<<<<<<<<<<
18227 : * for i in range(extent):
18228 : * memcpy(data, item, itemsize)
18229 : */
18230 0 : goto __pyx_L3;
18231 : }
18232 :
18233 : /* "View.MemoryView":1412
18234 : * data += stride
18235 : * else:
18236 : * for i in range(extent): # <<<<<<<<<<<<<<
18237 : * _slice_assign_scalar(data, shape + 1, strides + 1, ndim - 1, itemsize, item)
18238 : * data += stride
18239 : */
18240 : /*else*/ {
18241 : __pyx_t_2 = __pyx_v_extent;
18242 : __pyx_t_3 = __pyx_t_2;
18243 0 : for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
18244 0 : __pyx_v_i = __pyx_t_4;
18245 :
18246 : /* "View.MemoryView":1413
18247 : * else:
18248 : * for i in range(extent):
18249 : * _slice_assign_scalar(data, shape + 1, strides + 1, ndim - 1, itemsize, item) # <<<<<<<<<<<<<<
18250 : * data += stride
18251 : *
18252 : */
18253 0 : __pyx_memoryview__slice_assign_scalar(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize, __pyx_v_item);
18254 :
18255 : /* "View.MemoryView":1414
18256 : * for i in range(extent):
18257 : * _slice_assign_scalar(data, shape + 1, strides + 1, ndim - 1, itemsize, item)
18258 : * data += stride # <<<<<<<<<<<<<<
18259 : *
18260 : *
18261 : */
18262 0 : __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
18263 : }
18264 : }
18265 0 : __pyx_L3:;
18266 :
18267 : /* "View.MemoryView":1400
18268 : *
18269 : * @cname('__pyx_memoryview__slice_assign_scalar')
18270 : * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
18271 : * Py_ssize_t *strides, int ndim,
18272 : * size_t itemsize, void *item) noexcept nogil:
18273 : */
18274 :
18275 : /* function exit code */
18276 0 : }
18277 :
18278 : /* "(tree fragment)":1
18279 : * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
18280 : * cdef object __pyx_PickleError
18281 : * cdef object __pyx_result
18282 : */
18283 :
18284 : /* Python wrapper */
18285 : static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self,
18286 : #if CYTHON_METH_FASTCALL
18287 : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
18288 : #else
18289 : PyObject *__pyx_args, PyObject *__pyx_kwds
18290 : #endif
18291 : ); /*proto*/
18292 : static PyMethodDef __pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum = {"__pyx_unpickle_Enum", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
18293 0 : static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self,
18294 : #if CYTHON_METH_FASTCALL
18295 : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
18296 : #else
18297 : PyObject *__pyx_args, PyObject *__pyx_kwds
18298 : #endif
18299 : ) {
18300 0 : PyObject *__pyx_v___pyx_type = 0;
18301 0 : long __pyx_v___pyx_checksum;
18302 0 : PyObject *__pyx_v___pyx_state = 0;
18303 : #if !CYTHON_METH_FASTCALL
18304 : CYTHON_UNUSED Py_ssize_t __pyx_nargs;
18305 : #endif
18306 0 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
18307 0 : PyObject* values[3] = {0,0,0};
18308 0 : int __pyx_lineno = 0;
18309 0 : const char *__pyx_filename = NULL;
18310 0 : int __pyx_clineno = 0;
18311 0 : PyObject *__pyx_r = 0;
18312 : __Pyx_RefNannyDeclarations
18313 0 : __Pyx_RefNannySetupContext("__pyx_unpickle_Enum (wrapper)", 0);
18314 : #if !CYTHON_METH_FASTCALL
18315 : #if CYTHON_ASSUME_SAFE_MACROS
18316 : __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
18317 : #else
18318 : __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
18319 : #endif
18320 : #endif
18321 0 : __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
18322 : {
18323 0 : PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
18324 0 : if (__pyx_kwds) {
18325 0 : Py_ssize_t kw_args;
18326 0 : switch (__pyx_nargs) {
18327 0 : case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
18328 0 : CYTHON_FALLTHROUGH;
18329 0 : case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
18330 0 : CYTHON_FALLTHROUGH;
18331 0 : case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
18332 0 : CYTHON_FALLTHROUGH;
18333 0 : case 0: break;
18334 0 : default: goto __pyx_L5_argtuple_error;
18335 : }
18336 0 : kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
18337 0 : switch (__pyx_nargs) {
18338 0 : case 0:
18339 0 : if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) {
18340 0 : (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
18341 0 : kw_args--;
18342 : }
18343 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
18344 0 : else goto __pyx_L5_argtuple_error;
18345 0 : CYTHON_FALLTHROUGH;
18346 : case 1:
18347 0 : if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) {
18348 0 : (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
18349 0 : kw_args--;
18350 : }
18351 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
18352 : else {
18353 0 : __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
18354 : }
18355 0 : CYTHON_FALLTHROUGH;
18356 : case 2:
18357 0 : if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
18358 0 : (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
18359 0 : kw_args--;
18360 : }
18361 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
18362 : else {
18363 0 : __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
18364 : }
18365 : }
18366 0 : if (unlikely(kw_args > 0)) {
18367 0 : const Py_ssize_t kwd_pos_args = __pyx_nargs;
18368 0 : if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_Enum") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
18369 : }
18370 0 : } else if (unlikely(__pyx_nargs != 3)) {
18371 0 : goto __pyx_L5_argtuple_error;
18372 : } else {
18373 0 : values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
18374 0 : values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
18375 0 : values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
18376 : }
18377 0 : __pyx_v___pyx_type = values[0];
18378 0 : __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
18379 0 : __pyx_v___pyx_state = values[2];
18380 : }
18381 0 : goto __pyx_L6_skip;
18382 0 : __pyx_L5_argtuple_error:;
18383 0 : __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 1, __pyx_L3_error)
18384 0 : __pyx_L6_skip:;
18385 0 : goto __pyx_L4_argument_unpacking_done;
18386 0 : __pyx_L3_error:;
18387 : {
18388 0 : Py_ssize_t __pyx_temp;
18389 0 : for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
18390 : __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
18391 : }
18392 : }
18393 0 : __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename);
18394 0 : __Pyx_RefNannyFinishContext();
18395 0 : return NULL;
18396 0 : __pyx_L4_argument_unpacking_done:;
18397 0 : __pyx_r = __pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
18398 :
18399 : /* function exit code */
18400 : {
18401 0 : Py_ssize_t __pyx_temp;
18402 0 : for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
18403 : __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
18404 : }
18405 : }
18406 : __Pyx_RefNannyFinishContext();
18407 : return __pyx_r;
18408 : }
18409 :
18410 0 : static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
18411 0 : PyObject *__pyx_v___pyx_PickleError = 0;
18412 0 : PyObject *__pyx_v___pyx_result = 0;
18413 0 : PyObject *__pyx_r = NULL;
18414 : __Pyx_RefNannyDeclarations
18415 0 : PyObject *__pyx_t_1 = NULL;
18416 0 : int __pyx_t_2;
18417 0 : PyObject *__pyx_t_3 = NULL;
18418 0 : PyObject *__pyx_t_4 = NULL;
18419 0 : unsigned int __pyx_t_5;
18420 0 : int __pyx_lineno = 0;
18421 0 : const char *__pyx_filename = NULL;
18422 0 : int __pyx_clineno = 0;
18423 0 : __Pyx_RefNannySetupContext("__pyx_unpickle_Enum", 1);
18424 :
18425 : /* "(tree fragment)":4
18426 : * cdef object __pyx_PickleError
18427 : * cdef object __pyx_result
18428 : * if __pyx_checksum not in (0x82a3537, 0x6ae9995, 0xb068931): # <<<<<<<<<<<<<<
18429 : * from pickle import PickleError as __pyx_PickleError
18430 : * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum
18431 : */
18432 0 : __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
18433 0 : __Pyx_GOTREF(__pyx_t_1);
18434 0 : __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__8, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(1, 4, __pyx_L1_error)
18435 0 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18436 0 : if (__pyx_t_2) {
18437 :
18438 : /* "(tree fragment)":5
18439 : * cdef object __pyx_result
18440 : * if __pyx_checksum not in (0x82a3537, 0x6ae9995, 0xb068931):
18441 : * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
18442 : * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum
18443 : * __pyx_result = Enum.__new__(__pyx_type)
18444 : */
18445 0 : __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
18446 0 : __Pyx_GOTREF(__pyx_t_1);
18447 0 : __Pyx_INCREF(__pyx_n_s_PickleError);
18448 0 : __Pyx_GIVEREF(__pyx_n_s_PickleError);
18449 0 : if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError)) __PYX_ERR(1, 5, __pyx_L1_error);
18450 0 : __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
18451 0 : __Pyx_GOTREF(__pyx_t_3);
18452 0 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18453 0 : __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
18454 0 : __Pyx_GOTREF(__pyx_t_1);
18455 0 : __Pyx_INCREF(__pyx_t_1);
18456 0 : __pyx_v___pyx_PickleError = __pyx_t_1;
18457 0 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18458 0 : __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18459 :
18460 : /* "(tree fragment)":6
18461 : * if __pyx_checksum not in (0x82a3537, 0x6ae9995, 0xb068931):
18462 : * from pickle import PickleError as __pyx_PickleError
18463 : * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum # <<<<<<<<<<<<<<
18464 : * __pyx_result = Enum.__new__(__pyx_type)
18465 : * if __pyx_state is not None:
18466 : */
18467 0 : __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
18468 0 : __Pyx_GOTREF(__pyx_t_3);
18469 0 : __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
18470 0 : __Pyx_GOTREF(__pyx_t_1);
18471 0 : __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18472 0 : __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0);
18473 0 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18474 0 : __PYX_ERR(1, 6, __pyx_L1_error)
18475 :
18476 : /* "(tree fragment)":4
18477 : * cdef object __pyx_PickleError
18478 : * cdef object __pyx_result
18479 : * if __pyx_checksum not in (0x82a3537, 0x6ae9995, 0xb068931): # <<<<<<<<<<<<<<
18480 : * from pickle import PickleError as __pyx_PickleError
18481 : * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum
18482 : */
18483 : }
18484 :
18485 : /* "(tree fragment)":7
18486 : * from pickle import PickleError as __pyx_PickleError
18487 : * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum
18488 : * __pyx_result = Enum.__new__(__pyx_type) # <<<<<<<<<<<<<<
18489 : * if __pyx_state is not None:
18490 : * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
18491 : */
18492 0 : __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_MemviewEnum_type), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
18493 0 : __Pyx_GOTREF(__pyx_t_3);
18494 0 : __pyx_t_4 = NULL;
18495 0 : __pyx_t_5 = 0;
18496 : #if CYTHON_UNPACK_METHODS
18497 0 : if (likely(PyMethod_Check(__pyx_t_3))) {
18498 0 : __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
18499 0 : if (likely(__pyx_t_4)) {
18500 0 : PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
18501 0 : __Pyx_INCREF(__pyx_t_4);
18502 0 : __Pyx_INCREF(function);
18503 0 : __Pyx_DECREF_SET(__pyx_t_3, function);
18504 : __pyx_t_5 = 1;
18505 : }
18506 : }
18507 : #endif
18508 : {
18509 0 : PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
18510 0 : __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
18511 0 : __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
18512 0 : if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
18513 0 : __Pyx_GOTREF(__pyx_t_1);
18514 0 : __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18515 : }
18516 0 : __pyx_v___pyx_result = __pyx_t_1;
18517 0 : __pyx_t_1 = 0;
18518 :
18519 : /* "(tree fragment)":8
18520 : * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum
18521 : * __pyx_result = Enum.__new__(__pyx_type)
18522 : * if __pyx_state is not None: # <<<<<<<<<<<<<<
18523 : * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
18524 : * return __pyx_result
18525 : */
18526 0 : __pyx_t_2 = (__pyx_v___pyx_state != Py_None);
18527 0 : if (__pyx_t_2) {
18528 :
18529 : /* "(tree fragment)":9
18530 : * __pyx_result = Enum.__new__(__pyx_type)
18531 : * if __pyx_state is not None:
18532 : * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
18533 : * return __pyx_result
18534 : * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
18535 : */
18536 0 : if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(1, 9, __pyx_L1_error)
18537 0 : __pyx_t_1 = __pyx_unpickle_Enum__set_state(((struct __pyx_MemviewEnum_obj *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 9, __pyx_L1_error)
18538 0 : __Pyx_GOTREF(__pyx_t_1);
18539 0 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18540 :
18541 : /* "(tree fragment)":8
18542 : * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum
18543 : * __pyx_result = Enum.__new__(__pyx_type)
18544 : * if __pyx_state is not None: # <<<<<<<<<<<<<<
18545 : * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
18546 : * return __pyx_result
18547 : */
18548 : }
18549 :
18550 : /* "(tree fragment)":10
18551 : * if __pyx_state is not None:
18552 : * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
18553 : * return __pyx_result # <<<<<<<<<<<<<<
18554 : * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
18555 : * __pyx_result.name = __pyx_state[0]
18556 : */
18557 0 : __Pyx_XDECREF(__pyx_r);
18558 0 : __Pyx_INCREF(__pyx_v___pyx_result);
18559 0 : __pyx_r = __pyx_v___pyx_result;
18560 0 : goto __pyx_L0;
18561 :
18562 : /* "(tree fragment)":1
18563 : * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
18564 : * cdef object __pyx_PickleError
18565 : * cdef object __pyx_result
18566 : */
18567 :
18568 : /* function exit code */
18569 0 : __pyx_L1_error:;
18570 0 : __Pyx_XDECREF(__pyx_t_1);
18571 0 : __Pyx_XDECREF(__pyx_t_3);
18572 0 : __Pyx_XDECREF(__pyx_t_4);
18573 0 : __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename);
18574 0 : __pyx_r = NULL;
18575 0 : __pyx_L0:;
18576 0 : __Pyx_XDECREF(__pyx_v___pyx_PickleError);
18577 0 : __Pyx_XDECREF(__pyx_v___pyx_result);
18578 0 : __Pyx_XGIVEREF(__pyx_r);
18579 0 : __Pyx_RefNannyFinishContext();
18580 0 : return __pyx_r;
18581 : }
18582 :
18583 : /* "(tree fragment)":11
18584 : * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
18585 : * return __pyx_result
18586 : * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
18587 : * __pyx_result.name = __pyx_state[0]
18588 : * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
18589 : */
18590 :
18591 0 : static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
18592 0 : PyObject *__pyx_r = NULL;
18593 : __Pyx_RefNannyDeclarations
18594 0 : PyObject *__pyx_t_1 = NULL;
18595 0 : int __pyx_t_2;
18596 0 : Py_ssize_t __pyx_t_3;
18597 0 : int __pyx_t_4;
18598 0 : PyObject *__pyx_t_5 = NULL;
18599 0 : PyObject *__pyx_t_6 = NULL;
18600 0 : PyObject *__pyx_t_7 = NULL;
18601 0 : unsigned int __pyx_t_8;
18602 0 : int __pyx_lineno = 0;
18603 0 : const char *__pyx_filename = NULL;
18604 0 : int __pyx_clineno = 0;
18605 0 : __Pyx_RefNannySetupContext("__pyx_unpickle_Enum__set_state", 1);
18606 :
18607 : /* "(tree fragment)":12
18608 : * return __pyx_result
18609 : * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
18610 : * __pyx_result.name = __pyx_state[0] # <<<<<<<<<<<<<<
18611 : * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
18612 : * __pyx_result.__dict__.update(__pyx_state[1])
18613 : */
18614 0 : if (unlikely(__pyx_v___pyx_state == Py_None)) {
18615 0 : PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
18616 0 : __PYX_ERR(1, 12, __pyx_L1_error)
18617 : }
18618 0 : __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
18619 0 : __Pyx_GOTREF(__pyx_t_1);
18620 0 : __Pyx_GIVEREF(__pyx_t_1);
18621 0 : __Pyx_GOTREF(__pyx_v___pyx_result->name);
18622 0 : __Pyx_DECREF(__pyx_v___pyx_result->name);
18623 0 : __pyx_v___pyx_result->name = __pyx_t_1;
18624 0 : __pyx_t_1 = 0;
18625 :
18626 : /* "(tree fragment)":13
18627 : * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
18628 : * __pyx_result.name = __pyx_state[0]
18629 : * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
18630 : * __pyx_result.__dict__.update(__pyx_state[1])
18631 : */
18632 0 : if (unlikely(__pyx_v___pyx_state == Py_None)) {
18633 : PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
18634 : __PYX_ERR(1, 13, __pyx_L1_error)
18635 : }
18636 0 : __pyx_t_3 = __Pyx_PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
18637 0 : __pyx_t_4 = (__pyx_t_3 > 1);
18638 0 : if (__pyx_t_4) {
18639 0 : } else {
18640 0 : __pyx_t_2 = __pyx_t_4;
18641 0 : goto __pyx_L4_bool_binop_done;
18642 : }
18643 0 : __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
18644 : __pyx_t_2 = __pyx_t_4;
18645 0 : __pyx_L4_bool_binop_done:;
18646 0 : if (__pyx_t_2) {
18647 :
18648 : /* "(tree fragment)":14
18649 : * __pyx_result.name = __pyx_state[0]
18650 : * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
18651 : * __pyx_result.__dict__.update(__pyx_state[1]) # <<<<<<<<<<<<<<
18652 : */
18653 0 : __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 14, __pyx_L1_error)
18654 0 : __Pyx_GOTREF(__pyx_t_5);
18655 0 : __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_update); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
18656 0 : __Pyx_GOTREF(__pyx_t_6);
18657 0 : __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
18658 0 : if (unlikely(__pyx_v___pyx_state == Py_None)) {
18659 : PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
18660 : __PYX_ERR(1, 14, __pyx_L1_error)
18661 : }
18662 0 : __pyx_t_5 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 14, __pyx_L1_error)
18663 0 : __Pyx_GOTREF(__pyx_t_5);
18664 0 : __pyx_t_7 = NULL;
18665 0 : __pyx_t_8 = 0;
18666 : #if CYTHON_UNPACK_METHODS
18667 0 : if (likely(PyMethod_Check(__pyx_t_6))) {
18668 0 : __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
18669 0 : if (likely(__pyx_t_7)) {
18670 0 : PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
18671 0 : __Pyx_INCREF(__pyx_t_7);
18672 0 : __Pyx_INCREF(function);
18673 0 : __Pyx_DECREF_SET(__pyx_t_6, function);
18674 : __pyx_t_8 = 1;
18675 : }
18676 : }
18677 : #endif
18678 : {
18679 0 : PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5};
18680 0 : __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
18681 0 : __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
18682 0 : __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
18683 0 : if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
18684 0 : __Pyx_GOTREF(__pyx_t_1);
18685 0 : __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
18686 : }
18687 0 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18688 :
18689 : /* "(tree fragment)":13
18690 : * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
18691 : * __pyx_result.name = __pyx_state[0]
18692 : * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
18693 : * __pyx_result.__dict__.update(__pyx_state[1])
18694 : */
18695 : }
18696 :
18697 : /* "(tree fragment)":11
18698 : * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
18699 : * return __pyx_result
18700 : * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
18701 : * __pyx_result.name = __pyx_state[0]
18702 : * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
18703 : */
18704 :
18705 : /* function exit code */
18706 0 : __pyx_r = Py_None; __Pyx_INCREF(Py_None);
18707 0 : goto __pyx_L0;
18708 0 : __pyx_L1_error:;
18709 0 : __Pyx_XDECREF(__pyx_t_1);
18710 0 : __Pyx_XDECREF(__pyx_t_5);
18711 0 : __Pyx_XDECREF(__pyx_t_6);
18712 0 : __Pyx_XDECREF(__pyx_t_7);
18713 0 : __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
18714 0 : __pyx_r = 0;
18715 0 : __pyx_L0:;
18716 0 : __Pyx_XGIVEREF(__pyx_r);
18717 0 : __Pyx_RefNannyFinishContext();
18718 0 : return __pyx_r;
18719 : }
18720 :
18721 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":286
18722 : *
18723 : * @property
18724 : * cdef inline npy_intp itemsize(self) noexcept nogil: # <<<<<<<<<<<<<<
18725 : * return PyDataType_ELSIZE(self)
18726 : *
18727 : */
18728 :
18729 : static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_8itemsize_itemsize(PyArray_Descr *__pyx_v_self) {
18730 : npy_intp __pyx_r;
18731 :
18732 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":287
18733 : * @property
18734 : * cdef inline npy_intp itemsize(self) noexcept nogil:
18735 : * return PyDataType_ELSIZE(self) # <<<<<<<<<<<<<<
18736 : *
18737 : * @property
18738 : */
18739 : __pyx_r = PyDataType_ELSIZE(__pyx_v_self);
18740 : goto __pyx_L0;
18741 :
18742 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":286
18743 : *
18744 : * @property
18745 : * cdef inline npy_intp itemsize(self) noexcept nogil: # <<<<<<<<<<<<<<
18746 : * return PyDataType_ELSIZE(self)
18747 : *
18748 : */
18749 :
18750 : /* function exit code */
18751 : __pyx_L0:;
18752 : return __pyx_r;
18753 : }
18754 :
18755 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":290
18756 : *
18757 : * @property
18758 : * cdef inline npy_intp alignment(self) noexcept nogil: # <<<<<<<<<<<<<<
18759 : * return PyDataType_ALIGNMENT(self)
18760 : *
18761 : */
18762 :
18763 : static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_9alignment_alignment(PyArray_Descr *__pyx_v_self) {
18764 : npy_intp __pyx_r;
18765 :
18766 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":291
18767 : * @property
18768 : * cdef inline npy_intp alignment(self) noexcept nogil:
18769 : * return PyDataType_ALIGNMENT(self) # <<<<<<<<<<<<<<
18770 : *
18771 : * # Use fields/names with care as they may be NULL. You must check
18772 : */
18773 : __pyx_r = PyDataType_ALIGNMENT(__pyx_v_self);
18774 : goto __pyx_L0;
18775 :
18776 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":290
18777 : *
18778 : * @property
18779 : * cdef inline npy_intp alignment(self) noexcept nogil: # <<<<<<<<<<<<<<
18780 : * return PyDataType_ALIGNMENT(self)
18781 : *
18782 : */
18783 :
18784 : /* function exit code */
18785 : __pyx_L0:;
18786 : return __pyx_r;
18787 : }
18788 :
18789 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":296
18790 : * # for this using PyDataType_HASFIELDS.
18791 : * @property
18792 : * cdef inline object fields(self): # <<<<<<<<<<<<<<
18793 : * return <object>PyDataType_FIELDS(self)
18794 : *
18795 : */
18796 :
18797 : static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_6fields_fields(PyArray_Descr *__pyx_v_self) {
18798 : PyObject *__pyx_r = NULL;
18799 : __Pyx_RefNannyDeclarations
18800 : PyObject *__pyx_t_1;
18801 : __Pyx_RefNannySetupContext("fields", 1);
18802 :
18803 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":297
18804 : * @property
18805 : * cdef inline object fields(self):
18806 : * return <object>PyDataType_FIELDS(self) # <<<<<<<<<<<<<<
18807 : *
18808 : * @property
18809 : */
18810 : __Pyx_XDECREF(__pyx_r);
18811 : __pyx_t_1 = PyDataType_FIELDS(__pyx_v_self);
18812 : __Pyx_INCREF(((PyObject *)__pyx_t_1));
18813 : __pyx_r = ((PyObject *)__pyx_t_1);
18814 : goto __pyx_L0;
18815 :
18816 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":296
18817 : * # for this using PyDataType_HASFIELDS.
18818 : * @property
18819 : * cdef inline object fields(self): # <<<<<<<<<<<<<<
18820 : * return <object>PyDataType_FIELDS(self)
18821 : *
18822 : */
18823 :
18824 : /* function exit code */
18825 : __pyx_L0:;
18826 : __Pyx_XGIVEREF(__pyx_r);
18827 : __Pyx_RefNannyFinishContext();
18828 : return __pyx_r;
18829 : }
18830 :
18831 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":300
18832 : *
18833 : * @property
18834 : * cdef inline tuple names(self): # <<<<<<<<<<<<<<
18835 : * return <tuple>PyDataType_NAMES(self)
18836 : *
18837 : */
18838 :
18839 : static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_5names_names(PyArray_Descr *__pyx_v_self) {
18840 : PyObject *__pyx_r = NULL;
18841 : __Pyx_RefNannyDeclarations
18842 : PyObject *__pyx_t_1;
18843 : __Pyx_RefNannySetupContext("names", 1);
18844 :
18845 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":301
18846 : * @property
18847 : * cdef inline tuple names(self):
18848 : * return <tuple>PyDataType_NAMES(self) # <<<<<<<<<<<<<<
18849 : *
18850 : * # Use PyDataType_HASSUBARRAY to test whether this field is
18851 : */
18852 : __Pyx_XDECREF(__pyx_r);
18853 : __pyx_t_1 = PyDataType_NAMES(__pyx_v_self);
18854 : __Pyx_INCREF(((PyObject*)__pyx_t_1));
18855 : __pyx_r = ((PyObject*)__pyx_t_1);
18856 : goto __pyx_L0;
18857 :
18858 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":300
18859 : *
18860 : * @property
18861 : * cdef inline tuple names(self): # <<<<<<<<<<<<<<
18862 : * return <tuple>PyDataType_NAMES(self)
18863 : *
18864 : */
18865 :
18866 : /* function exit code */
18867 : __pyx_L0:;
18868 : __Pyx_XGIVEREF(__pyx_r);
18869 : __Pyx_RefNannyFinishContext();
18870 : return __pyx_r;
18871 : }
18872 :
18873 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":307
18874 : * # this field via the inline helper method PyDataType_SHAPE.
18875 : * @property
18876 : * cdef inline PyArray_ArrayDescr* subarray(self) noexcept nogil: # <<<<<<<<<<<<<<
18877 : * return PyDataType_SUBARRAY(self)
18878 : *
18879 : */
18880 :
18881 : static CYTHON_INLINE PyArray_ArrayDescr *__pyx_f_5numpy_5dtype_8subarray_subarray(PyArray_Descr *__pyx_v_self) {
18882 : PyArray_ArrayDescr *__pyx_r;
18883 :
18884 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":308
18885 : * @property
18886 : * cdef inline PyArray_ArrayDescr* subarray(self) noexcept nogil:
18887 : * return PyDataType_SUBARRAY(self) # <<<<<<<<<<<<<<
18888 : *
18889 : * @property
18890 : */
18891 : __pyx_r = PyDataType_SUBARRAY(__pyx_v_self);
18892 : goto __pyx_L0;
18893 :
18894 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":307
18895 : * # this field via the inline helper method PyDataType_SHAPE.
18896 : * @property
18897 : * cdef inline PyArray_ArrayDescr* subarray(self) noexcept nogil: # <<<<<<<<<<<<<<
18898 : * return PyDataType_SUBARRAY(self)
18899 : *
18900 : */
18901 :
18902 : /* function exit code */
18903 : __pyx_L0:;
18904 : return __pyx_r;
18905 : }
18906 :
18907 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":311
18908 : *
18909 : * @property
18910 : * cdef inline npy_uint64 flags(self) noexcept nogil: # <<<<<<<<<<<<<<
18911 : * """The data types flags."""
18912 : * return PyDataType_FLAGS(self)
18913 : */
18914 :
18915 : static CYTHON_INLINE npy_uint64 __pyx_f_5numpy_5dtype_5flags_flags(PyArray_Descr *__pyx_v_self) {
18916 : npy_uint64 __pyx_r;
18917 :
18918 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":313
18919 : * cdef inline npy_uint64 flags(self) noexcept nogil:
18920 : * """The data types flags."""
18921 : * return PyDataType_FLAGS(self) # <<<<<<<<<<<<<<
18922 : *
18923 : *
18924 : */
18925 : __pyx_r = PyDataType_FLAGS(__pyx_v_self);
18926 : goto __pyx_L0;
18927 :
18928 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":311
18929 : *
18930 : * @property
18931 : * cdef inline npy_uint64 flags(self) noexcept nogil: # <<<<<<<<<<<<<<
18932 : * """The data types flags."""
18933 : * return PyDataType_FLAGS(self)
18934 : */
18935 :
18936 : /* function exit code */
18937 : __pyx_L0:;
18938 : return __pyx_r;
18939 : }
18940 :
18941 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":323
18942 : *
18943 : * @property
18944 : * cdef inline int numiter(self) noexcept nogil: # <<<<<<<<<<<<<<
18945 : * """The number of arrays that need to be broadcast to the same shape."""
18946 : * return PyArray_MultiIter_NUMITER(self)
18947 : */
18948 :
18949 : static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_7numiter_numiter(PyArrayMultiIterObject *__pyx_v_self) {
18950 : int __pyx_r;
18951 :
18952 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":325
18953 : * cdef inline int numiter(self) noexcept nogil:
18954 : * """The number of arrays that need to be broadcast to the same shape."""
18955 : * return PyArray_MultiIter_NUMITER(self) # <<<<<<<<<<<<<<
18956 : *
18957 : * @property
18958 : */
18959 : __pyx_r = PyArray_MultiIter_NUMITER(__pyx_v_self);
18960 : goto __pyx_L0;
18961 :
18962 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":323
18963 : *
18964 : * @property
18965 : * cdef inline int numiter(self) noexcept nogil: # <<<<<<<<<<<<<<
18966 : * """The number of arrays that need to be broadcast to the same shape."""
18967 : * return PyArray_MultiIter_NUMITER(self)
18968 : */
18969 :
18970 : /* function exit code */
18971 : __pyx_L0:;
18972 : return __pyx_r;
18973 : }
18974 :
18975 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":328
18976 : *
18977 : * @property
18978 : * cdef inline npy_intp size(self) noexcept nogil: # <<<<<<<<<<<<<<
18979 : * """The total broadcasted size."""
18980 : * return PyArray_MultiIter_SIZE(self)
18981 : */
18982 :
18983 : static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_4size_size(PyArrayMultiIterObject *__pyx_v_self) {
18984 : npy_intp __pyx_r;
18985 :
18986 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":330
18987 : * cdef inline npy_intp size(self) noexcept nogil:
18988 : * """The total broadcasted size."""
18989 : * return PyArray_MultiIter_SIZE(self) # <<<<<<<<<<<<<<
18990 : *
18991 : * @property
18992 : */
18993 : __pyx_r = PyArray_MultiIter_SIZE(__pyx_v_self);
18994 : goto __pyx_L0;
18995 :
18996 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":328
18997 : *
18998 : * @property
18999 : * cdef inline npy_intp size(self) noexcept nogil: # <<<<<<<<<<<<<<
19000 : * """The total broadcasted size."""
19001 : * return PyArray_MultiIter_SIZE(self)
19002 : */
19003 :
19004 : /* function exit code */
19005 : __pyx_L0:;
19006 : return __pyx_r;
19007 : }
19008 :
19009 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":333
19010 : *
19011 : * @property
19012 : * cdef inline npy_intp index(self) noexcept nogil: # <<<<<<<<<<<<<<
19013 : * """The current (1-d) index into the broadcasted result."""
19014 : * return PyArray_MultiIter_INDEX(self)
19015 : */
19016 :
19017 : static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_5index_index(PyArrayMultiIterObject *__pyx_v_self) {
19018 : npy_intp __pyx_r;
19019 :
19020 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":335
19021 : * cdef inline npy_intp index(self) noexcept nogil:
19022 : * """The current (1-d) index into the broadcasted result."""
19023 : * return PyArray_MultiIter_INDEX(self) # <<<<<<<<<<<<<<
19024 : *
19025 : * @property
19026 : */
19027 : __pyx_r = PyArray_MultiIter_INDEX(__pyx_v_self);
19028 : goto __pyx_L0;
19029 :
19030 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":333
19031 : *
19032 : * @property
19033 : * cdef inline npy_intp index(self) noexcept nogil: # <<<<<<<<<<<<<<
19034 : * """The current (1-d) index into the broadcasted result."""
19035 : * return PyArray_MultiIter_INDEX(self)
19036 : */
19037 :
19038 : /* function exit code */
19039 : __pyx_L0:;
19040 : return __pyx_r;
19041 : }
19042 :
19043 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":338
19044 : *
19045 : * @property
19046 : * cdef inline int nd(self) noexcept nogil: # <<<<<<<<<<<<<<
19047 : * """The number of dimensions in the broadcasted result."""
19048 : * return PyArray_MultiIter_NDIM(self)
19049 : */
19050 :
19051 : static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_2nd_nd(PyArrayMultiIterObject *__pyx_v_self) {
19052 : int __pyx_r;
19053 :
19054 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":340
19055 : * cdef inline int nd(self) noexcept nogil:
19056 : * """The number of dimensions in the broadcasted result."""
19057 : * return PyArray_MultiIter_NDIM(self) # <<<<<<<<<<<<<<
19058 : *
19059 : * @property
19060 : */
19061 : __pyx_r = PyArray_MultiIter_NDIM(__pyx_v_self);
19062 : goto __pyx_L0;
19063 :
19064 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":338
19065 : *
19066 : * @property
19067 : * cdef inline int nd(self) noexcept nogil: # <<<<<<<<<<<<<<
19068 : * """The number of dimensions in the broadcasted result."""
19069 : * return PyArray_MultiIter_NDIM(self)
19070 : */
19071 :
19072 : /* function exit code */
19073 : __pyx_L0:;
19074 : return __pyx_r;
19075 : }
19076 :
19077 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":343
19078 : *
19079 : * @property
19080 : * cdef inline npy_intp* dimensions(self) noexcept nogil: # <<<<<<<<<<<<<<
19081 : * """The shape of the broadcasted result."""
19082 : * return PyArray_MultiIter_DIMS(self)
19083 : */
19084 :
19085 : static CYTHON_INLINE npy_intp *__pyx_f_5numpy_9broadcast_10dimensions_dimensions(PyArrayMultiIterObject *__pyx_v_self) {
19086 : npy_intp *__pyx_r;
19087 :
19088 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":345
19089 : * cdef inline npy_intp* dimensions(self) noexcept nogil:
19090 : * """The shape of the broadcasted result."""
19091 : * return PyArray_MultiIter_DIMS(self) # <<<<<<<<<<<<<<
19092 : *
19093 : * @property
19094 : */
19095 : __pyx_r = PyArray_MultiIter_DIMS(__pyx_v_self);
19096 : goto __pyx_L0;
19097 :
19098 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":343
19099 : *
19100 : * @property
19101 : * cdef inline npy_intp* dimensions(self) noexcept nogil: # <<<<<<<<<<<<<<
19102 : * """The shape of the broadcasted result."""
19103 : * return PyArray_MultiIter_DIMS(self)
19104 : */
19105 :
19106 : /* function exit code */
19107 : __pyx_L0:;
19108 : return __pyx_r;
19109 : }
19110 :
19111 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":348
19112 : *
19113 : * @property
19114 : * cdef inline void** iters(self) noexcept nogil: # <<<<<<<<<<<<<<
19115 : * """An array of iterator objects that holds the iterators for the arrays to be broadcast together.
19116 : * On return, the iterators are adjusted for broadcasting."""
19117 : */
19118 :
19119 : static CYTHON_INLINE void **__pyx_f_5numpy_9broadcast_5iters_iters(PyArrayMultiIterObject *__pyx_v_self) {
19120 : void **__pyx_r;
19121 :
19122 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":351
19123 : * """An array of iterator objects that holds the iterators for the arrays to be broadcast together.
19124 : * On return, the iterators are adjusted for broadcasting."""
19125 : * return PyArray_MultiIter_ITERS(self) # <<<<<<<<<<<<<<
19126 : *
19127 : *
19128 : */
19129 : __pyx_r = PyArray_MultiIter_ITERS(__pyx_v_self);
19130 : goto __pyx_L0;
19131 :
19132 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":348
19133 : *
19134 : * @property
19135 : * cdef inline void** iters(self) noexcept nogil: # <<<<<<<<<<<<<<
19136 : * """An array of iterator objects that holds the iterators for the arrays to be broadcast together.
19137 : * On return, the iterators are adjusted for broadcasting."""
19138 : */
19139 :
19140 : /* function exit code */
19141 : __pyx_L0:;
19142 : return __pyx_r;
19143 : }
19144 :
19145 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":366
19146 : *
19147 : * @property
19148 : * cdef inline PyObject* base(self) noexcept nogil: # <<<<<<<<<<<<<<
19149 : * """Returns a borrowed reference to the object owning the data/memory.
19150 : * """
19151 : */
19152 :
19153 : static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base_base(PyArrayObject *__pyx_v_self) {
19154 : PyObject *__pyx_r;
19155 :
19156 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":369
19157 : * """Returns a borrowed reference to the object owning the data/memory.
19158 : * """
19159 : * return PyArray_BASE(self) # <<<<<<<<<<<<<<
19160 : *
19161 : * @property
19162 : */
19163 : __pyx_r = PyArray_BASE(__pyx_v_self);
19164 : goto __pyx_L0;
19165 :
19166 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":366
19167 : *
19168 : * @property
19169 : * cdef inline PyObject* base(self) noexcept nogil: # <<<<<<<<<<<<<<
19170 : * """Returns a borrowed reference to the object owning the data/memory.
19171 : * """
19172 : */
19173 :
19174 : /* function exit code */
19175 : __pyx_L0:;
19176 : return __pyx_r;
19177 : }
19178 :
19179 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":372
19180 : *
19181 : * @property
19182 : * cdef inline dtype descr(self): # <<<<<<<<<<<<<<
19183 : * """Returns an owned reference to the dtype of the array.
19184 : * """
19185 : */
19186 :
19187 : static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArrayObject *__pyx_v_self) {
19188 : PyArray_Descr *__pyx_r = NULL;
19189 : __Pyx_RefNannyDeclarations
19190 : PyArray_Descr *__pyx_t_1;
19191 : __Pyx_RefNannySetupContext("descr", 1);
19192 :
19193 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":375
19194 : * """Returns an owned reference to the dtype of the array.
19195 : * """
19196 : * return <dtype>PyArray_DESCR(self) # <<<<<<<<<<<<<<
19197 : *
19198 : * @property
19199 : */
19200 : __Pyx_XDECREF((PyObject *)__pyx_r);
19201 : __pyx_t_1 = PyArray_DESCR(__pyx_v_self);
19202 : __Pyx_INCREF((PyObject *)((PyArray_Descr *)__pyx_t_1));
19203 : __pyx_r = ((PyArray_Descr *)__pyx_t_1);
19204 : goto __pyx_L0;
19205 :
19206 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":372
19207 : *
19208 : * @property
19209 : * cdef inline dtype descr(self): # <<<<<<<<<<<<<<
19210 : * """Returns an owned reference to the dtype of the array.
19211 : * """
19212 : */
19213 :
19214 : /* function exit code */
19215 : __pyx_L0:;
19216 : __Pyx_XGIVEREF((PyObject *)__pyx_r);
19217 : __Pyx_RefNannyFinishContext();
19218 : return __pyx_r;
19219 : }
19220 :
19221 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":378
19222 : *
19223 : * @property
19224 : * cdef inline int ndim(self) noexcept nogil: # <<<<<<<<<<<<<<
19225 : * """Returns the number of dimensions in the array.
19226 : * """
19227 : */
19228 :
19229 : static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx_v_self) {
19230 : int __pyx_r;
19231 :
19232 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":381
19233 : * """Returns the number of dimensions in the array.
19234 : * """
19235 : * return PyArray_NDIM(self) # <<<<<<<<<<<<<<
19236 : *
19237 : * @property
19238 : */
19239 : __pyx_r = PyArray_NDIM(__pyx_v_self);
19240 : goto __pyx_L0;
19241 :
19242 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":378
19243 : *
19244 : * @property
19245 : * cdef inline int ndim(self) noexcept nogil: # <<<<<<<<<<<<<<
19246 : * """Returns the number of dimensions in the array.
19247 : * """
19248 : */
19249 :
19250 : /* function exit code */
19251 : __pyx_L0:;
19252 : return __pyx_r;
19253 : }
19254 :
19255 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":384
19256 : *
19257 : * @property
19258 : * cdef inline npy_intp *shape(self) noexcept nogil: # <<<<<<<<<<<<<<
19259 : * """Returns a pointer to the dimensions/shape of the array.
19260 : * The number of elements matches the number of dimensions of the array (ndim).
19261 : */
19262 :
19263 : static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObject *__pyx_v_self) {
19264 : npy_intp *__pyx_r;
19265 :
19266 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":389
19267 : * Can return NULL for 0-dimensional arrays.
19268 : * """
19269 : * return PyArray_DIMS(self) # <<<<<<<<<<<<<<
19270 : *
19271 : * @property
19272 : */
19273 : __pyx_r = PyArray_DIMS(__pyx_v_self);
19274 : goto __pyx_L0;
19275 :
19276 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":384
19277 : *
19278 : * @property
19279 : * cdef inline npy_intp *shape(self) noexcept nogil: # <<<<<<<<<<<<<<
19280 : * """Returns a pointer to the dimensions/shape of the array.
19281 : * The number of elements matches the number of dimensions of the array (ndim).
19282 : */
19283 :
19284 : /* function exit code */
19285 : __pyx_L0:;
19286 : return __pyx_r;
19287 : }
19288 :
19289 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":392
19290 : *
19291 : * @property
19292 : * cdef inline npy_intp *strides(self) noexcept nogil: # <<<<<<<<<<<<<<
19293 : * """Returns a pointer to the strides of the array.
19294 : * The number of elements matches the number of dimensions of the array (ndim).
19295 : */
19296 :
19297 : static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayObject *__pyx_v_self) {
19298 : npy_intp *__pyx_r;
19299 :
19300 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":396
19301 : * The number of elements matches the number of dimensions of the array (ndim).
19302 : * """
19303 : * return PyArray_STRIDES(self) # <<<<<<<<<<<<<<
19304 : *
19305 : * @property
19306 : */
19307 : __pyx_r = PyArray_STRIDES(__pyx_v_self);
19308 : goto __pyx_L0;
19309 :
19310 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":392
19311 : *
19312 : * @property
19313 : * cdef inline npy_intp *strides(self) noexcept nogil: # <<<<<<<<<<<<<<
19314 : * """Returns a pointer to the strides of the array.
19315 : * The number of elements matches the number of dimensions of the array (ndim).
19316 : */
19317 :
19318 : /* function exit code */
19319 : __pyx_L0:;
19320 : return __pyx_r;
19321 : }
19322 :
19323 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":399
19324 : *
19325 : * @property
19326 : * cdef inline npy_intp size(self) noexcept nogil: # <<<<<<<<<<<<<<
19327 : * """Returns the total size (in number of elements) of the array.
19328 : * """
19329 : */
19330 :
19331 : static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject *__pyx_v_self) {
19332 : npy_intp __pyx_r;
19333 :
19334 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":402
19335 : * """Returns the total size (in number of elements) of the array.
19336 : * """
19337 : * return PyArray_SIZE(self) # <<<<<<<<<<<<<<
19338 : *
19339 : * @property
19340 : */
19341 : __pyx_r = PyArray_SIZE(__pyx_v_self);
19342 : goto __pyx_L0;
19343 :
19344 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":399
19345 : *
19346 : * @property
19347 : * cdef inline npy_intp size(self) noexcept nogil: # <<<<<<<<<<<<<<
19348 : * """Returns the total size (in number of elements) of the array.
19349 : * """
19350 : */
19351 :
19352 : /* function exit code */
19353 : __pyx_L0:;
19354 : return __pyx_r;
19355 : }
19356 :
19357 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":405
19358 : *
19359 : * @property
19360 : * cdef inline char* data(self) noexcept nogil: # <<<<<<<<<<<<<<
19361 : * """The pointer to the data buffer as a char*.
19362 : * This is provided for legacy reasons to avoid direct struct field access.
19363 : */
19364 :
19365 : static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data_data(PyArrayObject *__pyx_v_self) {
19366 : char *__pyx_r;
19367 :
19368 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":411
19369 : * of `PyArray_DATA()` instead, which returns a 'void*'.
19370 : * """
19371 : * return PyArray_BYTES(self) # <<<<<<<<<<<<<<
19372 : *
19373 : *
19374 : */
19375 : __pyx_r = PyArray_BYTES(__pyx_v_self);
19376 : goto __pyx_L0;
19377 :
19378 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":405
19379 : *
19380 : * @property
19381 : * cdef inline char* data(self) noexcept nogil: # <<<<<<<<<<<<<<
19382 : * """The pointer to the data buffer as a char*.
19383 : * This is provided for legacy reasons to avoid direct struct field access.
19384 : */
19385 :
19386 : /* function exit code */
19387 : __pyx_L0:;
19388 : return __pyx_r;
19389 : }
19390 :
19391 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":806
19392 : * ctypedef long double complex clongdouble_t
19393 : *
19394 : * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
19395 : * return PyArray_MultiIterNew(1, <void*>a)
19396 : *
19397 : */
19398 :
19399 : static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
19400 : PyObject *__pyx_r = NULL;
19401 : __Pyx_RefNannyDeclarations
19402 : PyObject *__pyx_t_1 = NULL;
19403 : int __pyx_lineno = 0;
19404 : const char *__pyx_filename = NULL;
19405 : int __pyx_clineno = 0;
19406 : __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 1);
19407 :
19408 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":807
19409 : *
19410 : * cdef inline object PyArray_MultiIterNew1(a):
19411 : * return PyArray_MultiIterNew(1, <void*>a) # <<<<<<<<<<<<<<
19412 : *
19413 : * cdef inline object PyArray_MultiIterNew2(a, b):
19414 : */
19415 : __Pyx_XDECREF(__pyx_r);
19416 : __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 807, __pyx_L1_error)
19417 : __Pyx_GOTREF(__pyx_t_1);
19418 : __pyx_r = __pyx_t_1;
19419 : __pyx_t_1 = 0;
19420 : goto __pyx_L0;
19421 :
19422 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":806
19423 : * ctypedef long double complex clongdouble_t
19424 : *
19425 : * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
19426 : * return PyArray_MultiIterNew(1, <void*>a)
19427 : *
19428 : */
19429 :
19430 : /* function exit code */
19431 : __pyx_L1_error:;
19432 : __Pyx_XDECREF(__pyx_t_1);
19433 : __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename);
19434 : __pyx_r = 0;
19435 : __pyx_L0:;
19436 : __Pyx_XGIVEREF(__pyx_r);
19437 : __Pyx_RefNannyFinishContext();
19438 : return __pyx_r;
19439 : }
19440 :
19441 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":809
19442 : * return PyArray_MultiIterNew(1, <void*>a)
19443 : *
19444 : * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
19445 : * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
19446 : *
19447 : */
19448 :
19449 : static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
19450 : PyObject *__pyx_r = NULL;
19451 : __Pyx_RefNannyDeclarations
19452 : PyObject *__pyx_t_1 = NULL;
19453 : int __pyx_lineno = 0;
19454 : const char *__pyx_filename = NULL;
19455 : int __pyx_clineno = 0;
19456 : __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 1);
19457 :
19458 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":810
19459 : *
19460 : * cdef inline object PyArray_MultiIterNew2(a, b):
19461 : * return PyArray_MultiIterNew(2, <void*>a, <void*>b) # <<<<<<<<<<<<<<
19462 : *
19463 : * cdef inline object PyArray_MultiIterNew3(a, b, c):
19464 : */
19465 : __Pyx_XDECREF(__pyx_r);
19466 : __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 810, __pyx_L1_error)
19467 : __Pyx_GOTREF(__pyx_t_1);
19468 : __pyx_r = __pyx_t_1;
19469 : __pyx_t_1 = 0;
19470 : goto __pyx_L0;
19471 :
19472 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":809
19473 : * return PyArray_MultiIterNew(1, <void*>a)
19474 : *
19475 : * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
19476 : * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
19477 : *
19478 : */
19479 :
19480 : /* function exit code */
19481 : __pyx_L1_error:;
19482 : __Pyx_XDECREF(__pyx_t_1);
19483 : __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename);
19484 : __pyx_r = 0;
19485 : __pyx_L0:;
19486 : __Pyx_XGIVEREF(__pyx_r);
19487 : __Pyx_RefNannyFinishContext();
19488 : return __pyx_r;
19489 : }
19490 :
19491 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":812
19492 : * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
19493 : *
19494 : * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
19495 : * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
19496 : *
19497 : */
19498 :
19499 : static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
19500 : PyObject *__pyx_r = NULL;
19501 : __Pyx_RefNannyDeclarations
19502 : PyObject *__pyx_t_1 = NULL;
19503 : int __pyx_lineno = 0;
19504 : const char *__pyx_filename = NULL;
19505 : int __pyx_clineno = 0;
19506 : __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 1);
19507 :
19508 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":813
19509 : *
19510 : * cdef inline object PyArray_MultiIterNew3(a, b, c):
19511 : * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c) # <<<<<<<<<<<<<<
19512 : *
19513 : * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
19514 : */
19515 : __Pyx_XDECREF(__pyx_r);
19516 : __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 813, __pyx_L1_error)
19517 : __Pyx_GOTREF(__pyx_t_1);
19518 : __pyx_r = __pyx_t_1;
19519 : __pyx_t_1 = 0;
19520 : goto __pyx_L0;
19521 :
19522 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":812
19523 : * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
19524 : *
19525 : * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
19526 : * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
19527 : *
19528 : */
19529 :
19530 : /* function exit code */
19531 : __pyx_L1_error:;
19532 : __Pyx_XDECREF(__pyx_t_1);
19533 : __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename);
19534 : __pyx_r = 0;
19535 : __pyx_L0:;
19536 : __Pyx_XGIVEREF(__pyx_r);
19537 : __Pyx_RefNannyFinishContext();
19538 : return __pyx_r;
19539 : }
19540 :
19541 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":815
19542 : * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
19543 : *
19544 : * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
19545 : * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
19546 : *
19547 : */
19548 :
19549 : static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) {
19550 : PyObject *__pyx_r = NULL;
19551 : __Pyx_RefNannyDeclarations
19552 : PyObject *__pyx_t_1 = NULL;
19553 : int __pyx_lineno = 0;
19554 : const char *__pyx_filename = NULL;
19555 : int __pyx_clineno = 0;
19556 : __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 1);
19557 :
19558 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":816
19559 : *
19560 : * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
19561 : * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d) # <<<<<<<<<<<<<<
19562 : *
19563 : * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
19564 : */
19565 : __Pyx_XDECREF(__pyx_r);
19566 : __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 816, __pyx_L1_error)
19567 : __Pyx_GOTREF(__pyx_t_1);
19568 : __pyx_r = __pyx_t_1;
19569 : __pyx_t_1 = 0;
19570 : goto __pyx_L0;
19571 :
19572 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":815
19573 : * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
19574 : *
19575 : * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
19576 : * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
19577 : *
19578 : */
19579 :
19580 : /* function exit code */
19581 : __pyx_L1_error:;
19582 : __Pyx_XDECREF(__pyx_t_1);
19583 : __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename);
19584 : __pyx_r = 0;
19585 : __pyx_L0:;
19586 : __Pyx_XGIVEREF(__pyx_r);
19587 : __Pyx_RefNannyFinishContext();
19588 : return __pyx_r;
19589 : }
19590 :
19591 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":818
19592 : * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
19593 : *
19594 : * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
19595 : * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
19596 : *
19597 : */
19598 :
19599 : static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) {
19600 : PyObject *__pyx_r = NULL;
19601 : __Pyx_RefNannyDeclarations
19602 : PyObject *__pyx_t_1 = NULL;
19603 : int __pyx_lineno = 0;
19604 : const char *__pyx_filename = NULL;
19605 : int __pyx_clineno = 0;
19606 : __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 1);
19607 :
19608 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":819
19609 : *
19610 : * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
19611 : * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e) # <<<<<<<<<<<<<<
19612 : *
19613 : * cdef inline tuple PyDataType_SHAPE(dtype d):
19614 : */
19615 : __Pyx_XDECREF(__pyx_r);
19616 : __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 819, __pyx_L1_error)
19617 : __Pyx_GOTREF(__pyx_t_1);
19618 : __pyx_r = __pyx_t_1;
19619 : __pyx_t_1 = 0;
19620 : goto __pyx_L0;
19621 :
19622 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":818
19623 : * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
19624 : *
19625 : * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
19626 : * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
19627 : *
19628 : */
19629 :
19630 : /* function exit code */
19631 : __pyx_L1_error:;
19632 : __Pyx_XDECREF(__pyx_t_1);
19633 : __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename);
19634 : __pyx_r = 0;
19635 : __pyx_L0:;
19636 : __Pyx_XGIVEREF(__pyx_r);
19637 : __Pyx_RefNannyFinishContext();
19638 : return __pyx_r;
19639 : }
19640 :
19641 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":821
19642 : * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
19643 : *
19644 : * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<
19645 : * if PyDataType_HASSUBARRAY(d):
19646 : * return <tuple>d.subarray.shape
19647 : */
19648 :
19649 : static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) {
19650 : PyObject *__pyx_r = NULL;
19651 : __Pyx_RefNannyDeclarations
19652 : int __pyx_t_1;
19653 : PyObject *__pyx_t_2;
19654 : __Pyx_RefNannySetupContext("PyDataType_SHAPE", 1);
19655 :
19656 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":822
19657 : *
19658 : * cdef inline tuple PyDataType_SHAPE(dtype d):
19659 : * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<
19660 : * return <tuple>d.subarray.shape
19661 : * else:
19662 : */
19663 : __pyx_t_1 = PyDataType_HASSUBARRAY(__pyx_v_d);
19664 : if (__pyx_t_1) {
19665 :
19666 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":823
19667 : * cdef inline tuple PyDataType_SHAPE(dtype d):
19668 : * if PyDataType_HASSUBARRAY(d):
19669 : * return <tuple>d.subarray.shape # <<<<<<<<<<<<<<
19670 : * else:
19671 : * return ()
19672 : */
19673 : __Pyx_XDECREF(__pyx_r);
19674 : __pyx_t_2 = __pyx_f_5numpy_5dtype_8subarray_subarray(__pyx_v_d)->shape;
19675 : __Pyx_INCREF(((PyObject*)__pyx_t_2));
19676 : __pyx_r = ((PyObject*)__pyx_t_2);
19677 : goto __pyx_L0;
19678 :
19679 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":822
19680 : *
19681 : * cdef inline tuple PyDataType_SHAPE(dtype d):
19682 : * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<
19683 : * return <tuple>d.subarray.shape
19684 : * else:
19685 : */
19686 : }
19687 :
19688 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":825
19689 : * return <tuple>d.subarray.shape
19690 : * else:
19691 : * return () # <<<<<<<<<<<<<<
19692 : *
19693 : *
19694 : */
19695 : /*else*/ {
19696 : __Pyx_XDECREF(__pyx_r);
19697 : __Pyx_INCREF(__pyx_empty_tuple);
19698 : __pyx_r = __pyx_empty_tuple;
19699 : goto __pyx_L0;
19700 : }
19701 :
19702 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":821
19703 : * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
19704 : *
19705 : * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<
19706 : * if PyDataType_HASSUBARRAY(d):
19707 : * return <tuple>d.subarray.shape
19708 : */
19709 :
19710 : /* function exit code */
19711 : __pyx_L0:;
19712 : __Pyx_XGIVEREF(__pyx_r);
19713 : __Pyx_RefNannyFinishContext();
19714 : return __pyx_r;
19715 : }
19716 :
19717 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1009
19718 : * int _import_umath() except -1
19719 : *
19720 : * cdef inline void set_array_base(ndarray arr, object base) except *: # <<<<<<<<<<<<<<
19721 : * Py_INCREF(base) # important to do this before stealing the reference below!
19722 : * PyArray_SetBaseObject(arr, base)
19723 : */
19724 :
19725 : static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
19726 : int __pyx_t_1;
19727 : int __pyx_lineno = 0;
19728 : const char *__pyx_filename = NULL;
19729 : int __pyx_clineno = 0;
19730 :
19731 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1010
19732 : *
19733 : * cdef inline void set_array_base(ndarray arr, object base) except *:
19734 : * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<<
19735 : * PyArray_SetBaseObject(arr, base)
19736 : *
19737 : */
19738 : Py_INCREF(__pyx_v_base);
19739 :
19740 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1011
19741 : * cdef inline void set_array_base(ndarray arr, object base) except *:
19742 : * Py_INCREF(base) # important to do this before stealing the reference below!
19743 : * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<<
19744 : *
19745 : * cdef inline object get_array_base(ndarray arr):
19746 : */
19747 : __pyx_t_1 = PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 1011, __pyx_L1_error)
19748 :
19749 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1009
19750 : * int _import_umath() except -1
19751 : *
19752 : * cdef inline void set_array_base(ndarray arr, object base) except *: # <<<<<<<<<<<<<<
19753 : * Py_INCREF(base) # important to do this before stealing the reference below!
19754 : * PyArray_SetBaseObject(arr, base)
19755 : */
19756 :
19757 : /* function exit code */
19758 : goto __pyx_L0;
19759 : __pyx_L1_error:;
19760 : __Pyx_AddTraceback("numpy.set_array_base", __pyx_clineno, __pyx_lineno, __pyx_filename);
19761 : __pyx_L0:;
19762 : }
19763 :
19764 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1013
19765 : * PyArray_SetBaseObject(arr, base)
19766 : *
19767 : * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
19768 : * base = PyArray_BASE(arr)
19769 : * if base is NULL:
19770 : */
19771 :
19772 : static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
19773 : PyObject *__pyx_v_base;
19774 : PyObject *__pyx_r = NULL;
19775 : __Pyx_RefNannyDeclarations
19776 : int __pyx_t_1;
19777 : __Pyx_RefNannySetupContext("get_array_base", 1);
19778 :
19779 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1014
19780 : *
19781 : * cdef inline object get_array_base(ndarray arr):
19782 : * base = PyArray_BASE(arr) # <<<<<<<<<<<<<<
19783 : * if base is NULL:
19784 : * return None
19785 : */
19786 : __pyx_v_base = PyArray_BASE(__pyx_v_arr);
19787 :
19788 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1015
19789 : * cdef inline object get_array_base(ndarray arr):
19790 : * base = PyArray_BASE(arr)
19791 : * if base is NULL: # <<<<<<<<<<<<<<
19792 : * return None
19793 : * return <object>base
19794 : */
19795 : __pyx_t_1 = (__pyx_v_base == NULL);
19796 : if (__pyx_t_1) {
19797 :
19798 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1016
19799 : * base = PyArray_BASE(arr)
19800 : * if base is NULL:
19801 : * return None # <<<<<<<<<<<<<<
19802 : * return <object>base
19803 : *
19804 : */
19805 : __Pyx_XDECREF(__pyx_r);
19806 : __pyx_r = Py_None; __Pyx_INCREF(Py_None);
19807 : goto __pyx_L0;
19808 :
19809 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1015
19810 : * cdef inline object get_array_base(ndarray arr):
19811 : * base = PyArray_BASE(arr)
19812 : * if base is NULL: # <<<<<<<<<<<<<<
19813 : * return None
19814 : * return <object>base
19815 : */
19816 : }
19817 :
19818 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1017
19819 : * if base is NULL:
19820 : * return None
19821 : * return <object>base # <<<<<<<<<<<<<<
19822 : *
19823 : * # Versions of the import_* functions which are more suitable for
19824 : */
19825 : __Pyx_XDECREF(__pyx_r);
19826 : __Pyx_INCREF(((PyObject *)__pyx_v_base));
19827 : __pyx_r = ((PyObject *)__pyx_v_base);
19828 : goto __pyx_L0;
19829 :
19830 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1013
19831 : * PyArray_SetBaseObject(arr, base)
19832 : *
19833 : * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
19834 : * base = PyArray_BASE(arr)
19835 : * if base is NULL:
19836 : */
19837 :
19838 : /* function exit code */
19839 : __pyx_L0:;
19840 : __Pyx_XGIVEREF(__pyx_r);
19841 : __Pyx_RefNannyFinishContext();
19842 : return __pyx_r;
19843 : }
19844 :
19845 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1021
19846 : * # Versions of the import_* functions which are more suitable for
19847 : * # Cython code.
19848 : * cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
19849 : * try:
19850 : * __pyx_import_array()
19851 : */
19852 :
19853 3 : static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
19854 3 : int __pyx_r;
19855 : __Pyx_RefNannyDeclarations
19856 3 : PyObject *__pyx_t_1 = NULL;
19857 3 : PyObject *__pyx_t_2 = NULL;
19858 3 : PyObject *__pyx_t_3 = NULL;
19859 3 : int __pyx_t_4;
19860 3 : PyObject *__pyx_t_5 = NULL;
19861 3 : PyObject *__pyx_t_6 = NULL;
19862 3 : PyObject *__pyx_t_7 = NULL;
19863 3 : PyObject *__pyx_t_8 = NULL;
19864 3 : int __pyx_lineno = 0;
19865 3 : const char *__pyx_filename = NULL;
19866 3 : int __pyx_clineno = 0;
19867 3 : __Pyx_RefNannySetupContext("import_array", 1);
19868 :
19869 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1022
19870 : * # Cython code.
19871 : * cdef inline int import_array() except -1:
19872 : * try: # <<<<<<<<<<<<<<
19873 : * __pyx_import_array()
19874 : * except Exception:
19875 : */
19876 : {
19877 3 : __Pyx_PyThreadState_declare
19878 3 : __Pyx_PyThreadState_assign
19879 3 : __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
19880 3 : __Pyx_XGOTREF(__pyx_t_1);
19881 3 : __Pyx_XGOTREF(__pyx_t_2);
19882 3 : __Pyx_XGOTREF(__pyx_t_3);
19883 : /*try:*/ {
19884 :
19885 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1023
19886 : * cdef inline int import_array() except -1:
19887 : * try:
19888 : * __pyx_import_array() # <<<<<<<<<<<<<<
19889 : * except Exception:
19890 : * raise ImportError("numpy._core.multiarray failed to import")
19891 : */
19892 3 : __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1023, __pyx_L3_error)
19893 :
19894 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1022
19895 : * # Cython code.
19896 : * cdef inline int import_array() except -1:
19897 : * try: # <<<<<<<<<<<<<<
19898 : * __pyx_import_array()
19899 : * except Exception:
19900 : */
19901 : }
19902 3 : __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
19903 3 : __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
19904 3 : __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
19905 3 : goto __pyx_L8_try_end;
19906 0 : __pyx_L3_error:;
19907 :
19908 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1024
19909 : * try:
19910 : * __pyx_import_array()
19911 : * except Exception: # <<<<<<<<<<<<<<
19912 : * raise ImportError("numpy._core.multiarray failed to import")
19913 : *
19914 : */
19915 0 : __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
19916 0 : if (__pyx_t_4) {
19917 0 : __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
19918 0 : if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1024, __pyx_L5_except_error)
19919 0 : __Pyx_XGOTREF(__pyx_t_5);
19920 0 : __Pyx_XGOTREF(__pyx_t_6);
19921 0 : __Pyx_XGOTREF(__pyx_t_7);
19922 :
19923 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1025
19924 : * __pyx_import_array()
19925 : * except Exception:
19926 : * raise ImportError("numpy._core.multiarray failed to import") # <<<<<<<<<<<<<<
19927 : *
19928 : * cdef inline int import_umath() except -1:
19929 : */
19930 0 : __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1025, __pyx_L5_except_error)
19931 0 : __Pyx_GOTREF(__pyx_t_8);
19932 0 : __Pyx_Raise(__pyx_t_8, 0, 0, 0);
19933 0 : __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19934 0 : __PYX_ERR(2, 1025, __pyx_L5_except_error)
19935 : }
19936 0 : goto __pyx_L5_except_error;
19937 :
19938 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1022
19939 : * # Cython code.
19940 : * cdef inline int import_array() except -1:
19941 : * try: # <<<<<<<<<<<<<<
19942 : * __pyx_import_array()
19943 : * except Exception:
19944 : */
19945 0 : __pyx_L5_except_error:;
19946 0 : __Pyx_XGIVEREF(__pyx_t_1);
19947 0 : __Pyx_XGIVEREF(__pyx_t_2);
19948 0 : __Pyx_XGIVEREF(__pyx_t_3);
19949 0 : __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
19950 0 : goto __pyx_L1_error;
19951 3 : __pyx_L8_try_end:;
19952 : }
19953 :
19954 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1021
19955 : * # Versions of the import_* functions which are more suitable for
19956 : * # Cython code.
19957 : * cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
19958 : * try:
19959 : * __pyx_import_array()
19960 : */
19961 :
19962 : /* function exit code */
19963 3 : __pyx_r = 0;
19964 3 : goto __pyx_L0;
19965 0 : __pyx_L1_error:;
19966 0 : __Pyx_XDECREF(__pyx_t_5);
19967 0 : __Pyx_XDECREF(__pyx_t_6);
19968 0 : __Pyx_XDECREF(__pyx_t_7);
19969 0 : __Pyx_XDECREF(__pyx_t_8);
19970 0 : __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
19971 0 : __pyx_r = -1;
19972 3 : __pyx_L0:;
19973 3 : __Pyx_RefNannyFinishContext();
19974 3 : return __pyx_r;
19975 : }
19976 :
19977 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1027
19978 : * raise ImportError("numpy._core.multiarray failed to import")
19979 : *
19980 : * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
19981 : * try:
19982 : * _import_umath()
19983 : */
19984 :
19985 : static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
19986 : int __pyx_r;
19987 : __Pyx_RefNannyDeclarations
19988 : PyObject *__pyx_t_1 = NULL;
19989 : PyObject *__pyx_t_2 = NULL;
19990 : PyObject *__pyx_t_3 = NULL;
19991 : int __pyx_t_4;
19992 : PyObject *__pyx_t_5 = NULL;
19993 : PyObject *__pyx_t_6 = NULL;
19994 : PyObject *__pyx_t_7 = NULL;
19995 : PyObject *__pyx_t_8 = NULL;
19996 : int __pyx_lineno = 0;
19997 : const char *__pyx_filename = NULL;
19998 : int __pyx_clineno = 0;
19999 : __Pyx_RefNannySetupContext("import_umath", 1);
20000 :
20001 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1028
20002 : *
20003 : * cdef inline int import_umath() except -1:
20004 : * try: # <<<<<<<<<<<<<<
20005 : * _import_umath()
20006 : * except Exception:
20007 : */
20008 : {
20009 : __Pyx_PyThreadState_declare
20010 : __Pyx_PyThreadState_assign
20011 : __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
20012 : __Pyx_XGOTREF(__pyx_t_1);
20013 : __Pyx_XGOTREF(__pyx_t_2);
20014 : __Pyx_XGOTREF(__pyx_t_3);
20015 : /*try:*/ {
20016 :
20017 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1029
20018 : * cdef inline int import_umath() except -1:
20019 : * try:
20020 : * _import_umath() # <<<<<<<<<<<<<<
20021 : * except Exception:
20022 : * raise ImportError("numpy._core.umath failed to import")
20023 : */
20024 : __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1029, __pyx_L3_error)
20025 :
20026 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1028
20027 : *
20028 : * cdef inline int import_umath() except -1:
20029 : * try: # <<<<<<<<<<<<<<
20030 : * _import_umath()
20031 : * except Exception:
20032 : */
20033 : }
20034 : __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
20035 : __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
20036 : __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
20037 : goto __pyx_L8_try_end;
20038 : __pyx_L3_error:;
20039 :
20040 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1030
20041 : * try:
20042 : * _import_umath()
20043 : * except Exception: # <<<<<<<<<<<<<<
20044 : * raise ImportError("numpy._core.umath failed to import")
20045 : *
20046 : */
20047 : __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
20048 : if (__pyx_t_4) {
20049 : __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
20050 : if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1030, __pyx_L5_except_error)
20051 : __Pyx_XGOTREF(__pyx_t_5);
20052 : __Pyx_XGOTREF(__pyx_t_6);
20053 : __Pyx_XGOTREF(__pyx_t_7);
20054 :
20055 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1031
20056 : * _import_umath()
20057 : * except Exception:
20058 : * raise ImportError("numpy._core.umath failed to import") # <<<<<<<<<<<<<<
20059 : *
20060 : * cdef inline int import_ufunc() except -1:
20061 : */
20062 : __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1031, __pyx_L5_except_error)
20063 : __Pyx_GOTREF(__pyx_t_8);
20064 : __Pyx_Raise(__pyx_t_8, 0, 0, 0);
20065 : __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
20066 : __PYX_ERR(2, 1031, __pyx_L5_except_error)
20067 : }
20068 : goto __pyx_L5_except_error;
20069 :
20070 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1028
20071 : *
20072 : * cdef inline int import_umath() except -1:
20073 : * try: # <<<<<<<<<<<<<<
20074 : * _import_umath()
20075 : * except Exception:
20076 : */
20077 : __pyx_L5_except_error:;
20078 : __Pyx_XGIVEREF(__pyx_t_1);
20079 : __Pyx_XGIVEREF(__pyx_t_2);
20080 : __Pyx_XGIVEREF(__pyx_t_3);
20081 : __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
20082 : goto __pyx_L1_error;
20083 : __pyx_L8_try_end:;
20084 : }
20085 :
20086 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1027
20087 : * raise ImportError("numpy._core.multiarray failed to import")
20088 : *
20089 : * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
20090 : * try:
20091 : * _import_umath()
20092 : */
20093 :
20094 : /* function exit code */
20095 : __pyx_r = 0;
20096 : goto __pyx_L0;
20097 : __pyx_L1_error:;
20098 : __Pyx_XDECREF(__pyx_t_5);
20099 : __Pyx_XDECREF(__pyx_t_6);
20100 : __Pyx_XDECREF(__pyx_t_7);
20101 : __Pyx_XDECREF(__pyx_t_8);
20102 : __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
20103 : __pyx_r = -1;
20104 : __pyx_L0:;
20105 : __Pyx_RefNannyFinishContext();
20106 : return __pyx_r;
20107 : }
20108 :
20109 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1033
20110 : * raise ImportError("numpy._core.umath failed to import")
20111 : *
20112 : * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
20113 : * try:
20114 : * _import_umath()
20115 : */
20116 :
20117 : static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
20118 : int __pyx_r;
20119 : __Pyx_RefNannyDeclarations
20120 : PyObject *__pyx_t_1 = NULL;
20121 : PyObject *__pyx_t_2 = NULL;
20122 : PyObject *__pyx_t_3 = NULL;
20123 : int __pyx_t_4;
20124 : PyObject *__pyx_t_5 = NULL;
20125 : PyObject *__pyx_t_6 = NULL;
20126 : PyObject *__pyx_t_7 = NULL;
20127 : PyObject *__pyx_t_8 = NULL;
20128 : int __pyx_lineno = 0;
20129 : const char *__pyx_filename = NULL;
20130 : int __pyx_clineno = 0;
20131 : __Pyx_RefNannySetupContext("import_ufunc", 1);
20132 :
20133 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1034
20134 : *
20135 : * cdef inline int import_ufunc() except -1:
20136 : * try: # <<<<<<<<<<<<<<
20137 : * _import_umath()
20138 : * except Exception:
20139 : */
20140 : {
20141 : __Pyx_PyThreadState_declare
20142 : __Pyx_PyThreadState_assign
20143 : __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
20144 : __Pyx_XGOTREF(__pyx_t_1);
20145 : __Pyx_XGOTREF(__pyx_t_2);
20146 : __Pyx_XGOTREF(__pyx_t_3);
20147 : /*try:*/ {
20148 :
20149 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1035
20150 : * cdef inline int import_ufunc() except -1:
20151 : * try:
20152 : * _import_umath() # <<<<<<<<<<<<<<
20153 : * except Exception:
20154 : * raise ImportError("numpy._core.umath failed to import")
20155 : */
20156 : __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1035, __pyx_L3_error)
20157 :
20158 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1034
20159 : *
20160 : * cdef inline int import_ufunc() except -1:
20161 : * try: # <<<<<<<<<<<<<<
20162 : * _import_umath()
20163 : * except Exception:
20164 : */
20165 : }
20166 : __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
20167 : __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
20168 : __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
20169 : goto __pyx_L8_try_end;
20170 : __pyx_L3_error:;
20171 :
20172 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1036
20173 : * try:
20174 : * _import_umath()
20175 : * except Exception: # <<<<<<<<<<<<<<
20176 : * raise ImportError("numpy._core.umath failed to import")
20177 : *
20178 : */
20179 : __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
20180 : if (__pyx_t_4) {
20181 : __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
20182 : if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1036, __pyx_L5_except_error)
20183 : __Pyx_XGOTREF(__pyx_t_5);
20184 : __Pyx_XGOTREF(__pyx_t_6);
20185 : __Pyx_XGOTREF(__pyx_t_7);
20186 :
20187 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1037
20188 : * _import_umath()
20189 : * except Exception:
20190 : * raise ImportError("numpy._core.umath failed to import") # <<<<<<<<<<<<<<
20191 : *
20192 : *
20193 : */
20194 : __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1037, __pyx_L5_except_error)
20195 : __Pyx_GOTREF(__pyx_t_8);
20196 : __Pyx_Raise(__pyx_t_8, 0, 0, 0);
20197 : __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
20198 : __PYX_ERR(2, 1037, __pyx_L5_except_error)
20199 : }
20200 : goto __pyx_L5_except_error;
20201 :
20202 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1034
20203 : *
20204 : * cdef inline int import_ufunc() except -1:
20205 : * try: # <<<<<<<<<<<<<<
20206 : * _import_umath()
20207 : * except Exception:
20208 : */
20209 : __pyx_L5_except_error:;
20210 : __Pyx_XGIVEREF(__pyx_t_1);
20211 : __Pyx_XGIVEREF(__pyx_t_2);
20212 : __Pyx_XGIVEREF(__pyx_t_3);
20213 : __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
20214 : goto __pyx_L1_error;
20215 : __pyx_L8_try_end:;
20216 : }
20217 :
20218 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1033
20219 : * raise ImportError("numpy._core.umath failed to import")
20220 : *
20221 : * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
20222 : * try:
20223 : * _import_umath()
20224 : */
20225 :
20226 : /* function exit code */
20227 : __pyx_r = 0;
20228 : goto __pyx_L0;
20229 : __pyx_L1_error:;
20230 : __Pyx_XDECREF(__pyx_t_5);
20231 : __Pyx_XDECREF(__pyx_t_6);
20232 : __Pyx_XDECREF(__pyx_t_7);
20233 : __Pyx_XDECREF(__pyx_t_8);
20234 : __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
20235 : __pyx_r = -1;
20236 : __pyx_L0:;
20237 : __Pyx_RefNannyFinishContext();
20238 : return __pyx_r;
20239 : }
20240 :
20241 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1040
20242 : *
20243 : *
20244 : * cdef inline bint is_timedelta64_object(object obj) noexcept: # <<<<<<<<<<<<<<
20245 : * """
20246 : * Cython equivalent of `isinstance(obj, np.timedelta64)`
20247 : */
20248 :
20249 : static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) {
20250 : int __pyx_r;
20251 :
20252 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1052
20253 : * bool
20254 : * """
20255 : * return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type) # <<<<<<<<<<<<<<
20256 : *
20257 : *
20258 : */
20259 : __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type));
20260 : goto __pyx_L0;
20261 :
20262 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1040
20263 : *
20264 : *
20265 : * cdef inline bint is_timedelta64_object(object obj) noexcept: # <<<<<<<<<<<<<<
20266 : * """
20267 : * Cython equivalent of `isinstance(obj, np.timedelta64)`
20268 : */
20269 :
20270 : /* function exit code */
20271 : __pyx_L0:;
20272 : return __pyx_r;
20273 : }
20274 :
20275 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1055
20276 : *
20277 : *
20278 : * cdef inline bint is_datetime64_object(object obj) noexcept: # <<<<<<<<<<<<<<
20279 : * """
20280 : * Cython equivalent of `isinstance(obj, np.datetime64)`
20281 : */
20282 :
20283 : static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) {
20284 : int __pyx_r;
20285 :
20286 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1067
20287 : * bool
20288 : * """
20289 : * return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type) # <<<<<<<<<<<<<<
20290 : *
20291 : *
20292 : */
20293 : __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type));
20294 : goto __pyx_L0;
20295 :
20296 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1055
20297 : *
20298 : *
20299 : * cdef inline bint is_datetime64_object(object obj) noexcept: # <<<<<<<<<<<<<<
20300 : * """
20301 : * Cython equivalent of `isinstance(obj, np.datetime64)`
20302 : */
20303 :
20304 : /* function exit code */
20305 : __pyx_L0:;
20306 : return __pyx_r;
20307 : }
20308 :
20309 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1070
20310 : *
20311 : *
20312 : * cdef inline npy_datetime get_datetime64_value(object obj) noexcept nogil: # <<<<<<<<<<<<<<
20313 : * """
20314 : * returns the int64 value underlying scalar numpy datetime64 object
20315 : */
20316 :
20317 : static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) {
20318 : npy_datetime __pyx_r;
20319 :
20320 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1077
20321 : * also needed. That can be found using `get_datetime64_unit`.
20322 : * """
20323 : * return (<PyDatetimeScalarObject*>obj).obval # <<<<<<<<<<<<<<
20324 : *
20325 : *
20326 : */
20327 : __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval;
20328 : goto __pyx_L0;
20329 :
20330 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1070
20331 : *
20332 : *
20333 : * cdef inline npy_datetime get_datetime64_value(object obj) noexcept nogil: # <<<<<<<<<<<<<<
20334 : * """
20335 : * returns the int64 value underlying scalar numpy datetime64 object
20336 : */
20337 :
20338 : /* function exit code */
20339 : __pyx_L0:;
20340 : return __pyx_r;
20341 : }
20342 :
20343 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1080
20344 : *
20345 : *
20346 : * cdef inline npy_timedelta get_timedelta64_value(object obj) noexcept nogil: # <<<<<<<<<<<<<<
20347 : * """
20348 : * returns the int64 value underlying scalar numpy timedelta64 object
20349 : */
20350 :
20351 : static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) {
20352 : npy_timedelta __pyx_r;
20353 :
20354 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1084
20355 : * returns the int64 value underlying scalar numpy timedelta64 object
20356 : * """
20357 : * return (<PyTimedeltaScalarObject*>obj).obval # <<<<<<<<<<<<<<
20358 : *
20359 : *
20360 : */
20361 : __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval;
20362 : goto __pyx_L0;
20363 :
20364 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1080
20365 : *
20366 : *
20367 : * cdef inline npy_timedelta get_timedelta64_value(object obj) noexcept nogil: # <<<<<<<<<<<<<<
20368 : * """
20369 : * returns the int64 value underlying scalar numpy timedelta64 object
20370 : */
20371 :
20372 : /* function exit code */
20373 : __pyx_L0:;
20374 : return __pyx_r;
20375 : }
20376 :
20377 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1087
20378 : *
20379 : *
20380 : * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) noexcept nogil: # <<<<<<<<<<<<<<
20381 : * """
20382 : * returns the unit part of the dtype for a numpy datetime64 object.
20383 : */
20384 :
20385 : static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) {
20386 : NPY_DATETIMEUNIT __pyx_r;
20387 :
20388 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1091
20389 : * returns the unit part of the dtype for a numpy datetime64 object.
20390 : * """
20391 : * return <NPY_DATETIMEUNIT>(<PyDatetimeScalarObject*>obj).obmeta.base # <<<<<<<<<<<<<<
20392 : *
20393 : *
20394 : */
20395 : __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base);
20396 : goto __pyx_L0;
20397 :
20398 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1087
20399 : *
20400 : *
20401 : * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) noexcept nogil: # <<<<<<<<<<<<<<
20402 : * """
20403 : * returns the unit part of the dtype for a numpy datetime64 object.
20404 : */
20405 :
20406 : /* function exit code */
20407 : __pyx_L0:;
20408 : return __pyx_r;
20409 : }
20410 :
20411 : /* "scipy/stats/_sobol.pyx":40
20412 : *
20413 : *
20414 : * def get_poly_vinit(kind, dtype): # <<<<<<<<<<<<<<
20415 : * """Initialize and cache the direction numbers.
20416 : *
20417 : */
20418 :
20419 : /* Python wrapper */
20420 : static PyObject *__pyx_pw_5scipy_5stats_6_sobol_1get_poly_vinit(PyObject *__pyx_self,
20421 : #if CYTHON_METH_FASTCALL
20422 : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
20423 : #else
20424 : PyObject *__pyx_args, PyObject *__pyx_kwds
20425 : #endif
20426 : ); /*proto*/
20427 : PyDoc_STRVAR(__pyx_doc_5scipy_5stats_6_sobol_get_poly_vinit, "Initialize and cache the direction numbers.\n\n Uses a dictionary to store the arrays. `kind` allows to select which\n dictionary to pull. The key of each dictionary corresponds to the `dtype`.\n If the key is not present in any of the dictionary, both dictionaries are\n initialized with `_initialize_direction_numbers`, for the given `dtype`.\n\n This is only used during the initialization step in `_initialize_v`.\n\n Parameters\n ----------\n kind : {'poly', 'vinit'}\n Select which dictionary to pull.\n dtype : {np.uint32, np.uint64}\n Which dtype to use.\n\n Returns\n -------\n poly_vinit : np.ndarray\n Either ``poly`` or ``vinit`` matrix.\n\n ");
20428 : static PyMethodDef __pyx_mdef_5scipy_5stats_6_sobol_1get_poly_vinit = {"get_poly_vinit", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5scipy_5stats_6_sobol_1get_poly_vinit, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5scipy_5stats_6_sobol_get_poly_vinit};
20429 788 : static PyObject *__pyx_pw_5scipy_5stats_6_sobol_1get_poly_vinit(PyObject *__pyx_self,
20430 : #if CYTHON_METH_FASTCALL
20431 : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
20432 : #else
20433 : PyObject *__pyx_args, PyObject *__pyx_kwds
20434 : #endif
20435 : ) {
20436 788 : PyObject *__pyx_v_kind = 0;
20437 788 : PyObject *__pyx_v_dtype = 0;
20438 : #if !CYTHON_METH_FASTCALL
20439 : CYTHON_UNUSED Py_ssize_t __pyx_nargs;
20440 : #endif
20441 788 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
20442 788 : PyObject* values[2] = {0,0};
20443 788 : int __pyx_lineno = 0;
20444 788 : const char *__pyx_filename = NULL;
20445 788 : int __pyx_clineno = 0;
20446 788 : PyObject *__pyx_r = 0;
20447 : __Pyx_RefNannyDeclarations
20448 788 : __Pyx_RefNannySetupContext("get_poly_vinit (wrapper)", 0);
20449 : #if !CYTHON_METH_FASTCALL
20450 : #if CYTHON_ASSUME_SAFE_MACROS
20451 : __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
20452 : #else
20453 : __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
20454 : #endif
20455 : #endif
20456 788 : __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
20457 : {
20458 788 : PyObject **__pyx_pyargnames[] = {&__pyx_n_s_kind,&__pyx_n_s_dtype,0};
20459 788 : if (__pyx_kwds) {
20460 0 : Py_ssize_t kw_args;
20461 0 : switch (__pyx_nargs) {
20462 0 : case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
20463 0 : CYTHON_FALLTHROUGH;
20464 0 : case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
20465 0 : CYTHON_FALLTHROUGH;
20466 0 : case 0: break;
20467 0 : default: goto __pyx_L5_argtuple_error;
20468 : }
20469 0 : kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
20470 0 : switch (__pyx_nargs) {
20471 : case 0:
20472 0 : if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_kind)) != 0)) {
20473 0 : (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
20474 0 : kw_args--;
20475 : }
20476 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 40, __pyx_L3_error)
20477 0 : else goto __pyx_L5_argtuple_error;
20478 0 : CYTHON_FALLTHROUGH;
20479 : case 1:
20480 0 : if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_dtype)) != 0)) {
20481 0 : (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
20482 0 : kw_args--;
20483 : }
20484 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 40, __pyx_L3_error)
20485 : else {
20486 0 : __Pyx_RaiseArgtupleInvalid("get_poly_vinit", 1, 2, 2, 1); __PYX_ERR(0, 40, __pyx_L3_error)
20487 : }
20488 : }
20489 0 : if (unlikely(kw_args > 0)) {
20490 0 : const Py_ssize_t kwd_pos_args = __pyx_nargs;
20491 0 : if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "get_poly_vinit") < 0)) __PYX_ERR(0, 40, __pyx_L3_error)
20492 : }
20493 788 : } else if (unlikely(__pyx_nargs != 2)) {
20494 0 : goto __pyx_L5_argtuple_error;
20495 : } else {
20496 788 : values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
20497 788 : values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
20498 : }
20499 788 : __pyx_v_kind = values[0];
20500 788 : __pyx_v_dtype = values[1];
20501 : }
20502 788 : goto __pyx_L6_skip;
20503 0 : __pyx_L5_argtuple_error:;
20504 0 : __Pyx_RaiseArgtupleInvalid("get_poly_vinit", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 40, __pyx_L3_error)
20505 788 : __pyx_L6_skip:;
20506 788 : goto __pyx_L4_argument_unpacking_done;
20507 0 : __pyx_L3_error:;
20508 : {
20509 0 : Py_ssize_t __pyx_temp;
20510 0 : for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
20511 : __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
20512 : }
20513 : }
20514 0 : __Pyx_AddTraceback("scipy.stats._sobol.get_poly_vinit", __pyx_clineno, __pyx_lineno, __pyx_filename);
20515 0 : __Pyx_RefNannyFinishContext();
20516 0 : return NULL;
20517 788 : __pyx_L4_argument_unpacking_done:;
20518 788 : __pyx_r = __pyx_pf_5scipy_5stats_6_sobol_get_poly_vinit(__pyx_self, __pyx_v_kind, __pyx_v_dtype);
20519 :
20520 : /* function exit code */
20521 : {
20522 788 : Py_ssize_t __pyx_temp;
20523 788 : for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
20524 : __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
20525 : }
20526 : }
20527 : __Pyx_RefNannyFinishContext();
20528 : return __pyx_r;
20529 : }
20530 :
20531 788 : static PyObject *__pyx_pf_5scipy_5stats_6_sobol_get_poly_vinit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_kind, PyObject *__pyx_v_dtype) {
20532 788 : PyObject *__pyx_v_poly_vinit = NULL;
20533 788 : PyObject *__pyx_v_poly = NULL;
20534 788 : PyObject *__pyx_v_vinit = NULL;
20535 788 : PyObject *__pyx_r = NULL;
20536 : __Pyx_RefNannyDeclarations
20537 788 : int __pyx_t_1;
20538 788 : PyObject *__pyx_t_2 = NULL;
20539 788 : PyObject *__pyx_t_3 = NULL;
20540 788 : PyObject *__pyx_t_4 = NULL;
20541 788 : unsigned int __pyx_t_5;
20542 788 : int __pyx_lineno = 0;
20543 788 : const char *__pyx_filename = NULL;
20544 788 : int __pyx_clineno = 0;
20545 788 : __Pyx_RefNannySetupContext("get_poly_vinit", 1);
20546 :
20547 : /* "scipy/stats/_sobol.pyx":63
20548 : *
20549 : * """
20550 : * if kind == 'poly': # <<<<<<<<<<<<<<
20551 : * poly_vinit = _poly_dict.get(dtype)
20552 : * else:
20553 : */
20554 788 : __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_kind, __pyx_n_u_poly, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 63, __pyx_L1_error)
20555 788 : if (__pyx_t_1) {
20556 :
20557 : /* "scipy/stats/_sobol.pyx":64
20558 : * """
20559 : * if kind == 'poly':
20560 : * poly_vinit = _poly_dict.get(dtype) # <<<<<<<<<<<<<<
20561 : * else:
20562 : * poly_vinit = _vinit_dict.get(dtype)
20563 : */
20564 394 : __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_poly_dict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 64, __pyx_L1_error)
20565 394 : __Pyx_GOTREF(__pyx_t_3);
20566 394 : __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 64, __pyx_L1_error)
20567 394 : __Pyx_GOTREF(__pyx_t_4);
20568 394 : __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20569 394 : __pyx_t_3 = NULL;
20570 394 : __pyx_t_5 = 0;
20571 : #if CYTHON_UNPACK_METHODS
20572 394 : if (unlikely(PyMethod_Check(__pyx_t_4))) {
20573 0 : __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
20574 0 : if (likely(__pyx_t_3)) {
20575 0 : PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
20576 0 : __Pyx_INCREF(__pyx_t_3);
20577 0 : __Pyx_INCREF(function);
20578 0 : __Pyx_DECREF_SET(__pyx_t_4, function);
20579 : __pyx_t_5 = 1;
20580 : }
20581 : }
20582 : #endif
20583 : {
20584 394 : PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_dtype};
20585 394 : __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
20586 394 : __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
20587 394 : if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 64, __pyx_L1_error)
20588 394 : __Pyx_GOTREF(__pyx_t_2);
20589 394 : __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20590 : }
20591 394 : __pyx_v_poly_vinit = __pyx_t_2;
20592 394 : __pyx_t_2 = 0;
20593 :
20594 : /* "scipy/stats/_sobol.pyx":63
20595 : *
20596 : * """
20597 : * if kind == 'poly': # <<<<<<<<<<<<<<
20598 : * poly_vinit = _poly_dict.get(dtype)
20599 : * else:
20600 : */
20601 394 : goto __pyx_L3;
20602 : }
20603 :
20604 : /* "scipy/stats/_sobol.pyx":66
20605 : * poly_vinit = _poly_dict.get(dtype)
20606 : * else:
20607 : * poly_vinit = _vinit_dict.get(dtype) # <<<<<<<<<<<<<<
20608 : *
20609 : * if poly_vinit is None:
20610 : */
20611 : /*else*/ {
20612 394 : __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_vinit_dict); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 66, __pyx_L1_error)
20613 394 : __Pyx_GOTREF(__pyx_t_4);
20614 394 : __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 66, __pyx_L1_error)
20615 394 : __Pyx_GOTREF(__pyx_t_3);
20616 394 : __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20617 394 : __pyx_t_4 = NULL;
20618 394 : __pyx_t_5 = 0;
20619 : #if CYTHON_UNPACK_METHODS
20620 394 : if (unlikely(PyMethod_Check(__pyx_t_3))) {
20621 0 : __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
20622 0 : if (likely(__pyx_t_4)) {
20623 0 : PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
20624 0 : __Pyx_INCREF(__pyx_t_4);
20625 0 : __Pyx_INCREF(function);
20626 0 : __Pyx_DECREF_SET(__pyx_t_3, function);
20627 : __pyx_t_5 = 1;
20628 : }
20629 : }
20630 : #endif
20631 : {
20632 394 : PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_dtype};
20633 394 : __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
20634 394 : __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
20635 394 : if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 66, __pyx_L1_error)
20636 394 : __Pyx_GOTREF(__pyx_t_2);
20637 394 : __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20638 : }
20639 394 : __pyx_v_poly_vinit = __pyx_t_2;
20640 394 : __pyx_t_2 = 0;
20641 : }
20642 788 : __pyx_L3:;
20643 :
20644 : /* "scipy/stats/_sobol.pyx":68
20645 : * poly_vinit = _vinit_dict.get(dtype)
20646 : *
20647 : * if poly_vinit is None: # <<<<<<<<<<<<<<
20648 : * poly = np.empty((MAXDIM,), dtype=dtype)
20649 : * vinit = np.empty((MAXDIM, MAXDEG), dtype=dtype)
20650 : */
20651 788 : __pyx_t_1 = (__pyx_v_poly_vinit == Py_None);
20652 788 : if (__pyx_t_1) {
20653 :
20654 : /* "scipy/stats/_sobol.pyx":69
20655 : *
20656 : * if poly_vinit is None:
20657 : * poly = np.empty((MAXDIM,), dtype=dtype) # <<<<<<<<<<<<<<
20658 : * vinit = np.empty((MAXDIM, MAXDEG), dtype=dtype)
20659 : *
20660 : */
20661 4 : __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 69, __pyx_L1_error)
20662 4 : __Pyx_GOTREF(__pyx_t_2);
20663 4 : __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 69, __pyx_L1_error)
20664 4 : __Pyx_GOTREF(__pyx_t_3);
20665 4 : __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20666 4 : __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 69, __pyx_L1_error)
20667 4 : __Pyx_GOTREF(__pyx_t_2);
20668 4 : if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_v_dtype) < 0) __PYX_ERR(0, 69, __pyx_L1_error)
20669 4 : __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__12, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 69, __pyx_L1_error)
20670 4 : __Pyx_GOTREF(__pyx_t_4);
20671 4 : __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20672 4 : __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20673 4 : __pyx_v_poly = __pyx_t_4;
20674 4 : __pyx_t_4 = 0;
20675 :
20676 : /* "scipy/stats/_sobol.pyx":70
20677 : * if poly_vinit is None:
20678 : * poly = np.empty((MAXDIM,), dtype=dtype)
20679 : * vinit = np.empty((MAXDIM, MAXDEG), dtype=dtype) # <<<<<<<<<<<<<<
20680 : *
20681 : * _initialize_direction_numbers(poly, vinit, dtype)
20682 : */
20683 4 : __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 70, __pyx_L1_error)
20684 4 : __Pyx_GOTREF(__pyx_t_4);
20685 4 : __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 70, __pyx_L1_error)
20686 4 : __Pyx_GOTREF(__pyx_t_2);
20687 4 : __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20688 4 : __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 70, __pyx_L1_error)
20689 4 : __Pyx_GOTREF(__pyx_t_4);
20690 4 : if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_v_dtype) < 0) __PYX_ERR(0, 70, __pyx_L1_error)
20691 4 : __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__14, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 70, __pyx_L1_error)
20692 4 : __Pyx_GOTREF(__pyx_t_3);
20693 4 : __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20694 4 : __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20695 4 : __pyx_v_vinit = __pyx_t_3;
20696 4 : __pyx_t_3 = 0;
20697 :
20698 : /* "scipy/stats/_sobol.pyx":72
20699 : * vinit = np.empty((MAXDIM, MAXDEG), dtype=dtype)
20700 : *
20701 : * _initialize_direction_numbers(poly, vinit, dtype) # <<<<<<<<<<<<<<
20702 : *
20703 : * _poly_dict[dtype] = poly
20704 : */
20705 4 : __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_initialize_direction_numbers); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 72, __pyx_L1_error)
20706 4 : __Pyx_GOTREF(__pyx_t_4);
20707 4 : __pyx_t_2 = NULL;
20708 4 : __pyx_t_5 = 0;
20709 : #if CYTHON_UNPACK_METHODS
20710 4 : if (unlikely(PyMethod_Check(__pyx_t_4))) {
20711 0 : __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
20712 0 : if (likely(__pyx_t_2)) {
20713 0 : PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
20714 0 : __Pyx_INCREF(__pyx_t_2);
20715 0 : __Pyx_INCREF(function);
20716 0 : __Pyx_DECREF_SET(__pyx_t_4, function);
20717 : __pyx_t_5 = 1;
20718 : }
20719 : }
20720 : #endif
20721 : {
20722 4 : PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_v_poly, __pyx_v_vinit, __pyx_v_dtype};
20723 4 : __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);
20724 4 : __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
20725 4 : if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 72, __pyx_L1_error)
20726 4 : __Pyx_GOTREF(__pyx_t_3);
20727 4 : __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20728 : }
20729 4 : __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20730 :
20731 : /* "scipy/stats/_sobol.pyx":74
20732 : * _initialize_direction_numbers(poly, vinit, dtype)
20733 : *
20734 : * _poly_dict[dtype] = poly # <<<<<<<<<<<<<<
20735 : * _vinit_dict[dtype] = vinit
20736 : *
20737 : */
20738 4 : __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_poly_dict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 74, __pyx_L1_error)
20739 4 : __Pyx_GOTREF(__pyx_t_3);
20740 4 : if (unlikely((PyObject_SetItem(__pyx_t_3, __pyx_v_dtype, __pyx_v_poly) < 0))) __PYX_ERR(0, 74, __pyx_L1_error)
20741 4 : __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20742 :
20743 : /* "scipy/stats/_sobol.pyx":75
20744 : *
20745 : * _poly_dict[dtype] = poly
20746 : * _vinit_dict[dtype] = vinit # <<<<<<<<<<<<<<
20747 : *
20748 : * if kind == 'poly':
20749 : */
20750 4 : __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_vinit_dict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 75, __pyx_L1_error)
20751 4 : __Pyx_GOTREF(__pyx_t_3);
20752 4 : if (unlikely((PyObject_SetItem(__pyx_t_3, __pyx_v_dtype, __pyx_v_vinit) < 0))) __PYX_ERR(0, 75, __pyx_L1_error)
20753 4 : __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20754 :
20755 : /* "scipy/stats/_sobol.pyx":77
20756 : * _vinit_dict[dtype] = vinit
20757 : *
20758 : * if kind == 'poly': # <<<<<<<<<<<<<<
20759 : * poly_vinit = _poly_dict.get(dtype)
20760 : * else:
20761 : */
20762 4 : __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_kind, __pyx_n_u_poly, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 77, __pyx_L1_error)
20763 4 : if (__pyx_t_1) {
20764 :
20765 : /* "scipy/stats/_sobol.pyx":78
20766 : *
20767 : * if kind == 'poly':
20768 : * poly_vinit = _poly_dict.get(dtype) # <<<<<<<<<<<<<<
20769 : * else:
20770 : * poly_vinit = _vinit_dict.get(dtype)
20771 : */
20772 4 : __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_poly_dict); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 78, __pyx_L1_error)
20773 4 : __Pyx_GOTREF(__pyx_t_4);
20774 4 : __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 78, __pyx_L1_error)
20775 4 : __Pyx_GOTREF(__pyx_t_2);
20776 4 : __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20777 4 : __pyx_t_4 = NULL;
20778 4 : __pyx_t_5 = 0;
20779 : #if CYTHON_UNPACK_METHODS
20780 4 : if (unlikely(PyMethod_Check(__pyx_t_2))) {
20781 0 : __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
20782 0 : if (likely(__pyx_t_4)) {
20783 0 : PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
20784 0 : __Pyx_INCREF(__pyx_t_4);
20785 0 : __Pyx_INCREF(function);
20786 0 : __Pyx_DECREF_SET(__pyx_t_2, function);
20787 : __pyx_t_5 = 1;
20788 : }
20789 : }
20790 : #endif
20791 : {
20792 4 : PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_dtype};
20793 4 : __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
20794 4 : __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
20795 4 : if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 78, __pyx_L1_error)
20796 4 : __Pyx_GOTREF(__pyx_t_3);
20797 4 : __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20798 : }
20799 4 : __Pyx_DECREF_SET(__pyx_v_poly_vinit, __pyx_t_3);
20800 4 : __pyx_t_3 = 0;
20801 :
20802 : /* "scipy/stats/_sobol.pyx":77
20803 : * _vinit_dict[dtype] = vinit
20804 : *
20805 : * if kind == 'poly': # <<<<<<<<<<<<<<
20806 : * poly_vinit = _poly_dict.get(dtype)
20807 : * else:
20808 : */
20809 4 : goto __pyx_L5;
20810 : }
20811 :
20812 : /* "scipy/stats/_sobol.pyx":80
20813 : * poly_vinit = _poly_dict.get(dtype)
20814 : * else:
20815 : * poly_vinit = _vinit_dict.get(dtype) # <<<<<<<<<<<<<<
20816 : *
20817 : * return poly_vinit
20818 : */
20819 : /*else*/ {
20820 0 : __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_vinit_dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error)
20821 0 : __Pyx_GOTREF(__pyx_t_2);
20822 0 : __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 80, __pyx_L1_error)
20823 0 : __Pyx_GOTREF(__pyx_t_4);
20824 0 : __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20825 0 : __pyx_t_2 = NULL;
20826 0 : __pyx_t_5 = 0;
20827 : #if CYTHON_UNPACK_METHODS
20828 0 : if (unlikely(PyMethod_Check(__pyx_t_4))) {
20829 0 : __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
20830 0 : if (likely(__pyx_t_2)) {
20831 0 : PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
20832 0 : __Pyx_INCREF(__pyx_t_2);
20833 0 : __Pyx_INCREF(function);
20834 0 : __Pyx_DECREF_SET(__pyx_t_4, function);
20835 : __pyx_t_5 = 1;
20836 : }
20837 : }
20838 : #endif
20839 : {
20840 0 : PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_dtype};
20841 0 : __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
20842 0 : __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
20843 0 : if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 80, __pyx_L1_error)
20844 0 : __Pyx_GOTREF(__pyx_t_3);
20845 0 : __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20846 : }
20847 0 : __Pyx_DECREF_SET(__pyx_v_poly_vinit, __pyx_t_3);
20848 788 : __pyx_t_3 = 0;
20849 : }
20850 788 : __pyx_L5:;
20851 :
20852 : /* "scipy/stats/_sobol.pyx":68
20853 : * poly_vinit = _vinit_dict.get(dtype)
20854 : *
20855 : * if poly_vinit is None: # <<<<<<<<<<<<<<
20856 : * poly = np.empty((MAXDIM,), dtype=dtype)
20857 : * vinit = np.empty((MAXDIM, MAXDEG), dtype=dtype)
20858 : */
20859 : }
20860 :
20861 : /* "scipy/stats/_sobol.pyx":82
20862 : * poly_vinit = _vinit_dict.get(dtype)
20863 : *
20864 : * return poly_vinit # <<<<<<<<<<<<<<
20865 : *
20866 : *
20867 : */
20868 788 : __Pyx_XDECREF(__pyx_r);
20869 788 : __Pyx_INCREF(__pyx_v_poly_vinit);
20870 788 : __pyx_r = __pyx_v_poly_vinit;
20871 788 : goto __pyx_L0;
20872 :
20873 : /* "scipy/stats/_sobol.pyx":40
20874 : *
20875 : *
20876 : * def get_poly_vinit(kind, dtype): # <<<<<<<<<<<<<<
20877 : * """Initialize and cache the direction numbers.
20878 : *
20879 : */
20880 :
20881 : /* function exit code */
20882 0 : __pyx_L1_error:;
20883 0 : __Pyx_XDECREF(__pyx_t_2);
20884 0 : __Pyx_XDECREF(__pyx_t_3);
20885 0 : __Pyx_XDECREF(__pyx_t_4);
20886 0 : __Pyx_AddTraceback("scipy.stats._sobol.get_poly_vinit", __pyx_clineno, __pyx_lineno, __pyx_filename);
20887 0 : __pyx_r = NULL;
20888 788 : __pyx_L0:;
20889 788 : __Pyx_XDECREF(__pyx_v_poly_vinit);
20890 788 : __Pyx_XDECREF(__pyx_v_poly);
20891 788 : __Pyx_XDECREF(__pyx_v_vinit);
20892 788 : __Pyx_XGIVEREF(__pyx_r);
20893 788 : __Pyx_RefNannyFinishContext();
20894 788 : return __pyx_r;
20895 : }
20896 :
20897 : /* "scipy/stats/_sobol.pyx":85
20898 : *
20899 : *
20900 : * def _initialize_direction_numbers(poly, vinit, dtype): # <<<<<<<<<<<<<<
20901 : * """Load direction numbers into two arrays.
20902 : *
20903 : */
20904 :
20905 : /* Python wrapper */
20906 : static PyObject *__pyx_pw_5scipy_5stats_6_sobol_3_initialize_direction_numbers(PyObject *__pyx_self,
20907 : #if CYTHON_METH_FASTCALL
20908 : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
20909 : #else
20910 : PyObject *__pyx_args, PyObject *__pyx_kwds
20911 : #endif
20912 : ); /*proto*/
20913 : PyDoc_STRVAR(__pyx_doc_5scipy_5stats_6_sobol_2_initialize_direction_numbers, "Load direction numbers into two arrays.\n\n Parameters\n ----------\n poly, vinit : np.ndarray\n Direction numbers arrays to fill.\n dtype : {np.uint32, np.uint64}\n Which dtype to use.\n\n Notes\n -----\n Direction numbers obtained using the search criterion D(6)\n up to the dimension 21201. This is the recommended choice by the authors.\n\n Original data can be found at https://web.maths.unsw.edu.au/~fkuo/sobol/.\n For additional details on the quantities involved, see [1].\n\n [1] S. Joe and F. Y. Kuo. Remark on algorithm 659: Implementing sobol's\n quasirandom sequence generator. ACM Trans. Math. Softw., 29(1):49-57,\n Mar. 2003.\n\n The C-code generated from putting the numbers in as literals is obscenely\n large/inefficient. The data file was thus packaged and save as an .npz data\n file for fast loading using the following code (this assumes that the file\n https://web.maths.unsw.edu.au/~fkuo/sobol/new-joe-kuo-6.21201 is present in\n the working directory):\n\n import pandas as pd\n import numpy as np\n\n # read in file content\n with open(\"./new-joe-kuo-6.21201\", \"r\") as f:\n lines = f.readlines()\n\n rows = []\n\n # parse data from file line by line\n for l in lines[1:]:\n nums = [int(n) for n in l.replace(\" \n\", \"\").split()]\n d, s, a = nums[:3]\n vs = {f\"v{i}\": int(v) for i,v in enumerate(nums[3:])}\n rows.append({\"d\": d, \"s\": s, \"a\": a, **vs})\n\n\n # read in as dataframe, explicitly use zero values\n df = pd.DataFrame(rows).fillna(0).astype(int)\n\n # perform conversion\n df[\"poly\"] = 2 * df[\"a\"] + 2 ** df[\"s\"] + 1\n\n # ensure columns are properly ordered\n vs = df[[f\"v{i}\" for i in range(18)]].values\n\n # add the degenerate d=1 column (not included in the data file)\n vs = np.vstack([vs[0][np.ne""waxis, :], vs])\n poly = np.concatenate([[1], df[\"poly\"].values])\n\n # save as compressed .npz file to minimize size of distribution\n np.savez_compressed(\"./_sobol_direction_numbers\", vinit=vs, poly=poly)\n\n ");
20914 : static PyMethodDef __pyx_mdef_5scipy_5stats_6_sobol_3_initialize_direction_numbers = {"_initialize_direction_numbers", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5scipy_5stats_6_sobol_3_initialize_direction_numbers, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5scipy_5stats_6_sobol_2_initialize_direction_numbers};
20915 4 : static PyObject *__pyx_pw_5scipy_5stats_6_sobol_3_initialize_direction_numbers(PyObject *__pyx_self,
20916 : #if CYTHON_METH_FASTCALL
20917 : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
20918 : #else
20919 : PyObject *__pyx_args, PyObject *__pyx_kwds
20920 : #endif
20921 : ) {
20922 4 : PyObject *__pyx_v_poly = 0;
20923 4 : PyObject *__pyx_v_vinit = 0;
20924 4 : PyObject *__pyx_v_dtype = 0;
20925 : #if !CYTHON_METH_FASTCALL
20926 : CYTHON_UNUSED Py_ssize_t __pyx_nargs;
20927 : #endif
20928 4 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
20929 4 : PyObject* values[3] = {0,0,0};
20930 4 : int __pyx_lineno = 0;
20931 4 : const char *__pyx_filename = NULL;
20932 4 : int __pyx_clineno = 0;
20933 4 : PyObject *__pyx_r = 0;
20934 : __Pyx_RefNannyDeclarations
20935 4 : __Pyx_RefNannySetupContext("_initialize_direction_numbers (wrapper)", 0);
20936 : #if !CYTHON_METH_FASTCALL
20937 : #if CYTHON_ASSUME_SAFE_MACROS
20938 : __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
20939 : #else
20940 : __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
20941 : #endif
20942 : #endif
20943 4 : __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
20944 : {
20945 4 : PyObject **__pyx_pyargnames[] = {&__pyx_n_s_poly,&__pyx_n_s_vinit,&__pyx_n_s_dtype,0};
20946 4 : if (__pyx_kwds) {
20947 0 : Py_ssize_t kw_args;
20948 0 : switch (__pyx_nargs) {
20949 0 : case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
20950 0 : CYTHON_FALLTHROUGH;
20951 0 : case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
20952 0 : CYTHON_FALLTHROUGH;
20953 0 : case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
20954 0 : CYTHON_FALLTHROUGH;
20955 0 : case 0: break;
20956 0 : default: goto __pyx_L5_argtuple_error;
20957 : }
20958 0 : kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
20959 0 : switch (__pyx_nargs) {
20960 0 : case 0:
20961 0 : if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_poly)) != 0)) {
20962 0 : (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
20963 0 : kw_args--;
20964 : }
20965 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 85, __pyx_L3_error)
20966 0 : else goto __pyx_L5_argtuple_error;
20967 0 : CYTHON_FALLTHROUGH;
20968 : case 1:
20969 0 : if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_vinit)) != 0)) {
20970 0 : (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
20971 0 : kw_args--;
20972 : }
20973 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 85, __pyx_L3_error)
20974 : else {
20975 0 : __Pyx_RaiseArgtupleInvalid("_initialize_direction_numbers", 1, 3, 3, 1); __PYX_ERR(0, 85, __pyx_L3_error)
20976 : }
20977 0 : CYTHON_FALLTHROUGH;
20978 : case 2:
20979 0 : if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_dtype)) != 0)) {
20980 0 : (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
20981 0 : kw_args--;
20982 : }
20983 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 85, __pyx_L3_error)
20984 : else {
20985 0 : __Pyx_RaiseArgtupleInvalid("_initialize_direction_numbers", 1, 3, 3, 2); __PYX_ERR(0, 85, __pyx_L3_error)
20986 : }
20987 : }
20988 0 : if (unlikely(kw_args > 0)) {
20989 0 : const Py_ssize_t kwd_pos_args = __pyx_nargs;
20990 0 : if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_initialize_direction_numbers") < 0)) __PYX_ERR(0, 85, __pyx_L3_error)
20991 : }
20992 4 : } else if (unlikely(__pyx_nargs != 3)) {
20993 0 : goto __pyx_L5_argtuple_error;
20994 : } else {
20995 4 : values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
20996 4 : values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
20997 4 : values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
20998 : }
20999 4 : __pyx_v_poly = values[0];
21000 4 : __pyx_v_vinit = values[1];
21001 4 : __pyx_v_dtype = values[2];
21002 : }
21003 4 : goto __pyx_L6_skip;
21004 0 : __pyx_L5_argtuple_error:;
21005 0 : __Pyx_RaiseArgtupleInvalid("_initialize_direction_numbers", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 85, __pyx_L3_error)
21006 4 : __pyx_L6_skip:;
21007 4 : goto __pyx_L4_argument_unpacking_done;
21008 0 : __pyx_L3_error:;
21009 : {
21010 0 : Py_ssize_t __pyx_temp;
21011 0 : for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
21012 : __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
21013 : }
21014 : }
21015 0 : __Pyx_AddTraceback("scipy.stats._sobol._initialize_direction_numbers", __pyx_clineno, __pyx_lineno, __pyx_filename);
21016 0 : __Pyx_RefNannyFinishContext();
21017 0 : return NULL;
21018 4 : __pyx_L4_argument_unpacking_done:;
21019 4 : __pyx_r = __pyx_pf_5scipy_5stats_6_sobol_2_initialize_direction_numbers(__pyx_self, __pyx_v_poly, __pyx_v_vinit, __pyx_v_dtype);
21020 :
21021 : /* function exit code */
21022 : {
21023 4 : Py_ssize_t __pyx_temp;
21024 4 : for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
21025 : __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
21026 : }
21027 : }
21028 : __Pyx_RefNannyFinishContext();
21029 : return __pyx_r;
21030 : }
21031 :
21032 4 : static PyObject *__pyx_pf_5scipy_5stats_6_sobol_2_initialize_direction_numbers(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_poly, PyObject *__pyx_v_vinit, PyObject *__pyx_v_dtype) {
21033 4 : PyObject *__pyx_v__curdir = NULL;
21034 4 : PyObject *__pyx_v__npzfile = NULL;
21035 4 : PyObject *__pyx_v_f = NULL;
21036 4 : PyObject *__pyx_v_dns = NULL;
21037 4 : PyObject *__pyx_v_dns_poly = NULL;
21038 4 : PyObject *__pyx_v_dns_vinit = NULL;
21039 4 : PyObject *__pyx_r = NULL;
21040 : __Pyx_RefNannyDeclarations
21041 4 : PyObject *__pyx_t_1 = NULL;
21042 4 : PyObject *__pyx_t_2 = NULL;
21043 4 : PyObject *__pyx_t_3 = NULL;
21044 4 : unsigned int __pyx_t_4;
21045 4 : PyObject *__pyx_t_5 = NULL;
21046 4 : PyObject *__pyx_t_6 = NULL;
21047 4 : PyObject *__pyx_t_7 = NULL;
21048 4 : PyObject *__pyx_t_8 = NULL;
21049 4 : PyObject *__pyx_t_9 = NULL;
21050 4 : PyObject *__pyx_t_10 = NULL;
21051 4 : int __pyx_t_11;
21052 4 : int __pyx_t_12;
21053 4 : int __pyx_lineno = 0;
21054 4 : const char *__pyx_filename = NULL;
21055 4 : int __pyx_clineno = 0;
21056 4 : __Pyx_RefNannySetupContext("_initialize_direction_numbers", 1);
21057 :
21058 : /* "scipy/stats/_sobol.pyx":147
21059 : *
21060 : * """
21061 : * _curdir = importlib.resources.files("scipy.stats") # <<<<<<<<<<<<<<
21062 : * _npzfile = _curdir.joinpath("_sobol_direction_numbers.npz")
21063 : * with importlib.resources.as_file(_npzfile) as f:
21064 : */
21065 4 : __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_importlib); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 147, __pyx_L1_error)
21066 4 : __Pyx_GOTREF(__pyx_t_2);
21067 4 : __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_resources); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 147, __pyx_L1_error)
21068 4 : __Pyx_GOTREF(__pyx_t_3);
21069 4 : __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21070 4 : __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_files); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 147, __pyx_L1_error)
21071 4 : __Pyx_GOTREF(__pyx_t_2);
21072 4 : __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21073 4 : __pyx_t_3 = NULL;
21074 4 : __pyx_t_4 = 0;
21075 : #if CYTHON_UNPACK_METHODS
21076 4 : if (likely(PyMethod_Check(__pyx_t_2))) {
21077 0 : __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
21078 0 : if (likely(__pyx_t_3)) {
21079 0 : PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
21080 0 : __Pyx_INCREF(__pyx_t_3);
21081 0 : __Pyx_INCREF(function);
21082 0 : __Pyx_DECREF_SET(__pyx_t_2, function);
21083 : __pyx_t_4 = 1;
21084 : }
21085 : }
21086 : #endif
21087 : {
21088 4 : PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_u_scipy_stats};
21089 4 : __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
21090 4 : __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
21091 4 : if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 147, __pyx_L1_error)
21092 4 : __Pyx_GOTREF(__pyx_t_1);
21093 4 : __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21094 : }
21095 4 : __pyx_v__curdir = __pyx_t_1;
21096 4 : __pyx_t_1 = 0;
21097 :
21098 : /* "scipy/stats/_sobol.pyx":148
21099 : * """
21100 : * _curdir = importlib.resources.files("scipy.stats")
21101 : * _npzfile = _curdir.joinpath("_sobol_direction_numbers.npz") # <<<<<<<<<<<<<<
21102 : * with importlib.resources.as_file(_npzfile) as f:
21103 : * dns = np.load(f)
21104 : */
21105 4 : __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__curdir, __pyx_n_s_joinpath); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 148, __pyx_L1_error)
21106 4 : __Pyx_GOTREF(__pyx_t_2);
21107 4 : __pyx_t_3 = NULL;
21108 4 : __pyx_t_4 = 0;
21109 : #if CYTHON_UNPACK_METHODS
21110 4 : if (likely(PyMethod_Check(__pyx_t_2))) {
21111 4 : __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
21112 4 : if (likely(__pyx_t_3)) {
21113 4 : PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
21114 4 : __Pyx_INCREF(__pyx_t_3);
21115 4 : __Pyx_INCREF(function);
21116 4 : __Pyx_DECREF_SET(__pyx_t_2, function);
21117 : __pyx_t_4 = 1;
21118 : }
21119 : }
21120 : #endif
21121 : {
21122 4 : PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_u_sobol_direction_numbers_npz};
21123 4 : __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
21124 4 : __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
21125 4 : if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 148, __pyx_L1_error)
21126 4 : __Pyx_GOTREF(__pyx_t_1);
21127 4 : __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21128 : }
21129 4 : __pyx_v__npzfile = __pyx_t_1;
21130 4 : __pyx_t_1 = 0;
21131 :
21132 : /* "scipy/stats/_sobol.pyx":149
21133 : * _curdir = importlib.resources.files("scipy.stats")
21134 : * _npzfile = _curdir.joinpath("_sobol_direction_numbers.npz")
21135 : * with importlib.resources.as_file(_npzfile) as f: # <<<<<<<<<<<<<<
21136 : * dns = np.load(f)
21137 : *
21138 : */
21139 : /*with:*/ {
21140 4 : __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_importlib); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 149, __pyx_L1_error)
21141 4 : __Pyx_GOTREF(__pyx_t_2);
21142 4 : __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_resources); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 149, __pyx_L1_error)
21143 4 : __Pyx_GOTREF(__pyx_t_3);
21144 4 : __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21145 4 : __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_as_file); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 149, __pyx_L1_error)
21146 4 : __Pyx_GOTREF(__pyx_t_2);
21147 4 : __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21148 4 : __pyx_t_3 = NULL;
21149 4 : __pyx_t_4 = 0;
21150 : #if CYTHON_UNPACK_METHODS
21151 4 : if (likely(PyMethod_Check(__pyx_t_2))) {
21152 0 : __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
21153 0 : if (likely(__pyx_t_3)) {
21154 0 : PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
21155 0 : __Pyx_INCREF(__pyx_t_3);
21156 0 : __Pyx_INCREF(function);
21157 0 : __Pyx_DECREF_SET(__pyx_t_2, function);
21158 : __pyx_t_4 = 1;
21159 : }
21160 : }
21161 : #endif
21162 : {
21163 4 : PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v__npzfile};
21164 4 : __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
21165 4 : __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
21166 4 : if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 149, __pyx_L1_error)
21167 4 : __Pyx_GOTREF(__pyx_t_1);
21168 4 : __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21169 : }
21170 4 : __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 149, __pyx_L1_error)
21171 4 : __Pyx_GOTREF(__pyx_t_5);
21172 4 : __pyx_t_3 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_enter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 149, __pyx_L3_error)
21173 4 : __Pyx_GOTREF(__pyx_t_3);
21174 4 : __pyx_t_6 = NULL;
21175 4 : __pyx_t_4 = 0;
21176 : #if CYTHON_UNPACK_METHODS
21177 4 : if (likely(PyMethod_Check(__pyx_t_3))) {
21178 4 : __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
21179 4 : if (likely(__pyx_t_6)) {
21180 4 : PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
21181 4 : __Pyx_INCREF(__pyx_t_6);
21182 4 : __Pyx_INCREF(function);
21183 4 : __Pyx_DECREF_SET(__pyx_t_3, function);
21184 : __pyx_t_4 = 1;
21185 : }
21186 : }
21187 : #endif
21188 : {
21189 4 : PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
21190 4 : __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
21191 4 : __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
21192 4 : if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 149, __pyx_L3_error)
21193 4 : __Pyx_GOTREF(__pyx_t_2);
21194 4 : __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21195 : }
21196 4 : __pyx_t_3 = __pyx_t_2;
21197 4 : __pyx_t_2 = 0;
21198 4 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21199 : /*try:*/ {
21200 : {
21201 4 : __Pyx_PyThreadState_declare
21202 4 : __Pyx_PyThreadState_assign
21203 4 : __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
21204 4 : __Pyx_XGOTREF(__pyx_t_7);
21205 4 : __Pyx_XGOTREF(__pyx_t_8);
21206 4 : __Pyx_XGOTREF(__pyx_t_9);
21207 : /*try:*/ {
21208 4 : __pyx_v_f = __pyx_t_3;
21209 4 : __pyx_t_3 = 0;
21210 :
21211 : /* "scipy/stats/_sobol.pyx":150
21212 : * _npzfile = _curdir.joinpath("_sobol_direction_numbers.npz")
21213 : * with importlib.resources.as_file(_npzfile) as f:
21214 : * dns = np.load(f) # <<<<<<<<<<<<<<
21215 : *
21216 : * dns_poly = dns["poly"].astype(dtype)
21217 : */
21218 4 : __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 150, __pyx_L7_error)
21219 4 : __Pyx_GOTREF(__pyx_t_1);
21220 4 : __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_load); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 150, __pyx_L7_error)
21221 4 : __Pyx_GOTREF(__pyx_t_2);
21222 4 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21223 4 : __pyx_t_1 = NULL;
21224 4 : __pyx_t_4 = 0;
21225 : #if CYTHON_UNPACK_METHODS
21226 4 : if (unlikely(PyMethod_Check(__pyx_t_2))) {
21227 0 : __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
21228 0 : if (likely(__pyx_t_1)) {
21229 0 : PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
21230 0 : __Pyx_INCREF(__pyx_t_1);
21231 0 : __Pyx_INCREF(function);
21232 0 : __Pyx_DECREF_SET(__pyx_t_2, function);
21233 : __pyx_t_4 = 1;
21234 : }
21235 : }
21236 : #endif
21237 : {
21238 4 : PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_f};
21239 4 : __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
21240 4 : __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
21241 4 : if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 150, __pyx_L7_error)
21242 4 : __Pyx_GOTREF(__pyx_t_3);
21243 4 : __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21244 : }
21245 4 : __pyx_v_dns = __pyx_t_3;
21246 4 : __pyx_t_3 = 0;
21247 :
21248 : /* "scipy/stats/_sobol.pyx":149
21249 : * _curdir = importlib.resources.files("scipy.stats")
21250 : * _npzfile = _curdir.joinpath("_sobol_direction_numbers.npz")
21251 : * with importlib.resources.as_file(_npzfile) as f: # <<<<<<<<<<<<<<
21252 : * dns = np.load(f)
21253 : *
21254 : */
21255 : }
21256 4 : __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
21257 4 : __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
21258 4 : __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
21259 4 : goto __pyx_L12_try_end;
21260 0 : __pyx_L7_error:;
21261 0 : __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
21262 0 : __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
21263 0 : __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
21264 0 : __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
21265 : /*except:*/ {
21266 0 : __Pyx_AddTraceback("scipy.stats._sobol._initialize_direction_numbers", __pyx_clineno, __pyx_lineno, __pyx_filename);
21267 0 : if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1) < 0) __PYX_ERR(0, 149, __pyx_L9_except_error)
21268 0 : __Pyx_XGOTREF(__pyx_t_3);
21269 0 : __Pyx_XGOTREF(__pyx_t_2);
21270 0 : __Pyx_XGOTREF(__pyx_t_1);
21271 0 : __pyx_t_6 = PyTuple_Pack(3, __pyx_t_3, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 149, __pyx_L9_except_error)
21272 0 : __Pyx_GOTREF(__pyx_t_6);
21273 0 : __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL);
21274 0 : __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21275 0 : __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
21276 0 : if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 149, __pyx_L9_except_error)
21277 0 : __Pyx_GOTREF(__pyx_t_10);
21278 0 : __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_10);
21279 0 : __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
21280 0 : if (__pyx_t_11 < 0) __PYX_ERR(0, 149, __pyx_L9_except_error)
21281 0 : __pyx_t_12 = (!__pyx_t_11);
21282 0 : if (unlikely(__pyx_t_12)) {
21283 0 : __Pyx_GIVEREF(__pyx_t_3);
21284 0 : __Pyx_GIVEREF(__pyx_t_2);
21285 0 : __Pyx_XGIVEREF(__pyx_t_1);
21286 0 : __Pyx_ErrRestoreWithState(__pyx_t_3, __pyx_t_2, __pyx_t_1);
21287 0 : __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0;
21288 0 : __PYX_ERR(0, 149, __pyx_L9_except_error)
21289 : }
21290 0 : __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
21291 0 : __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
21292 0 : __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
21293 0 : goto __pyx_L8_exception_handled;
21294 : }
21295 0 : __pyx_L9_except_error:;
21296 0 : __Pyx_XGIVEREF(__pyx_t_7);
21297 0 : __Pyx_XGIVEREF(__pyx_t_8);
21298 0 : __Pyx_XGIVEREF(__pyx_t_9);
21299 0 : __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
21300 0 : goto __pyx_L1_error;
21301 0 : __pyx_L8_exception_handled:;
21302 0 : __Pyx_XGIVEREF(__pyx_t_7);
21303 0 : __Pyx_XGIVEREF(__pyx_t_8);
21304 0 : __Pyx_XGIVEREF(__pyx_t_9);
21305 0 : __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
21306 4 : __pyx_L12_try_end:;
21307 : }
21308 : }
21309 : /*finally:*/ {
21310 : /*normal exit:*/{
21311 0 : if (__pyx_t_5) {
21312 4 : __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__15, NULL);
21313 4 : __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21314 4 : if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 149, __pyx_L1_error)
21315 4 : __Pyx_GOTREF(__pyx_t_9);
21316 4 : __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
21317 : }
21318 4 : goto __pyx_L6;
21319 : }
21320 4 : __pyx_L6:;
21321 : }
21322 4 : goto __pyx_L16;
21323 0 : __pyx_L3_error:;
21324 0 : __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21325 0 : goto __pyx_L1_error;
21326 4 : __pyx_L16:;
21327 : }
21328 :
21329 : /* "scipy/stats/_sobol.pyx":152
21330 : * dns = np.load(f)
21331 : *
21332 : * dns_poly = dns["poly"].astype(dtype) # <<<<<<<<<<<<<<
21333 : * dns_vinit = dns["vinit"].astype(dtype)
21334 : * poly[...] = dns_poly
21335 : */
21336 4 : if (unlikely(!__pyx_v_dns)) { __Pyx_RaiseUnboundLocalError("dns"); __PYX_ERR(0, 152, __pyx_L1_error) }
21337 4 : __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_dns, __pyx_n_u_poly); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 152, __pyx_L1_error)
21338 4 : __Pyx_GOTREF(__pyx_t_2);
21339 4 : __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_astype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 152, __pyx_L1_error)
21340 4 : __Pyx_GOTREF(__pyx_t_3);
21341 4 : __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21342 4 : __pyx_t_2 = NULL;
21343 4 : __pyx_t_4 = 0;
21344 : #if CYTHON_UNPACK_METHODS
21345 4 : if (likely(PyMethod_Check(__pyx_t_3))) {
21346 0 : __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
21347 0 : if (likely(__pyx_t_2)) {
21348 0 : PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
21349 0 : __Pyx_INCREF(__pyx_t_2);
21350 0 : __Pyx_INCREF(function);
21351 0 : __Pyx_DECREF_SET(__pyx_t_3, function);
21352 : __pyx_t_4 = 1;
21353 : }
21354 : }
21355 : #endif
21356 : {
21357 4 : PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_dtype};
21358 4 : __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
21359 4 : __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
21360 4 : if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 152, __pyx_L1_error)
21361 4 : __Pyx_GOTREF(__pyx_t_1);
21362 4 : __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21363 : }
21364 4 : __pyx_v_dns_poly = __pyx_t_1;
21365 4 : __pyx_t_1 = 0;
21366 :
21367 : /* "scipy/stats/_sobol.pyx":153
21368 : *
21369 : * dns_poly = dns["poly"].astype(dtype)
21370 : * dns_vinit = dns["vinit"].astype(dtype) # <<<<<<<<<<<<<<
21371 : * poly[...] = dns_poly
21372 : * vinit[...] = dns_vinit
21373 : */
21374 4 : if (unlikely(!__pyx_v_dns)) { __Pyx_RaiseUnboundLocalError("dns"); __PYX_ERR(0, 153, __pyx_L1_error) }
21375 4 : __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_dns, __pyx_n_u_vinit); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 153, __pyx_L1_error)
21376 4 : __Pyx_GOTREF(__pyx_t_3);
21377 4 : __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_astype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 153, __pyx_L1_error)
21378 4 : __Pyx_GOTREF(__pyx_t_2);
21379 4 : __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21380 4 : __pyx_t_3 = NULL;
21381 4 : __pyx_t_4 = 0;
21382 : #if CYTHON_UNPACK_METHODS
21383 4 : if (likely(PyMethod_Check(__pyx_t_2))) {
21384 0 : __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
21385 0 : if (likely(__pyx_t_3)) {
21386 0 : PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
21387 0 : __Pyx_INCREF(__pyx_t_3);
21388 0 : __Pyx_INCREF(function);
21389 0 : __Pyx_DECREF_SET(__pyx_t_2, function);
21390 : __pyx_t_4 = 1;
21391 : }
21392 : }
21393 : #endif
21394 : {
21395 4 : PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_dtype};
21396 4 : __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
21397 4 : __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
21398 4 : if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 153, __pyx_L1_error)
21399 4 : __Pyx_GOTREF(__pyx_t_1);
21400 4 : __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21401 : }
21402 4 : __pyx_v_dns_vinit = __pyx_t_1;
21403 4 : __pyx_t_1 = 0;
21404 :
21405 : /* "scipy/stats/_sobol.pyx":154
21406 : * dns_poly = dns["poly"].astype(dtype)
21407 : * dns_vinit = dns["vinit"].astype(dtype)
21408 : * poly[...] = dns_poly # <<<<<<<<<<<<<<
21409 : * vinit[...] = dns_vinit
21410 : *
21411 : */
21412 4 : if (unlikely((PyObject_SetItem(__pyx_v_poly, Py_Ellipsis, __pyx_v_dns_poly) < 0))) __PYX_ERR(0, 154, __pyx_L1_error)
21413 :
21414 : /* "scipy/stats/_sobol.pyx":155
21415 : * dns_vinit = dns["vinit"].astype(dtype)
21416 : * poly[...] = dns_poly
21417 : * vinit[...] = dns_vinit # <<<<<<<<<<<<<<
21418 : *
21419 : *
21420 : */
21421 4 : if (unlikely((PyObject_SetItem(__pyx_v_vinit, Py_Ellipsis, __pyx_v_dns_vinit) < 0))) __PYX_ERR(0, 155, __pyx_L1_error)
21422 :
21423 : /* "scipy/stats/_sobol.pyx":85
21424 : *
21425 : *
21426 : * def _initialize_direction_numbers(poly, vinit, dtype): # <<<<<<<<<<<<<<
21427 : * """Load direction numbers into two arrays.
21428 : *
21429 : */
21430 :
21431 : /* function exit code */
21432 4 : __pyx_r = Py_None; __Pyx_INCREF(Py_None);
21433 4 : goto __pyx_L0;
21434 0 : __pyx_L1_error:;
21435 0 : __Pyx_XDECREF(__pyx_t_1);
21436 0 : __Pyx_XDECREF(__pyx_t_2);
21437 0 : __Pyx_XDECREF(__pyx_t_3);
21438 0 : __Pyx_XDECREF(__pyx_t_6);
21439 0 : __Pyx_AddTraceback("scipy.stats._sobol._initialize_direction_numbers", __pyx_clineno, __pyx_lineno, __pyx_filename);
21440 0 : __pyx_r = NULL;
21441 4 : __pyx_L0:;
21442 4 : __Pyx_XDECREF(__pyx_v__curdir);
21443 4 : __Pyx_XDECREF(__pyx_v__npzfile);
21444 4 : __Pyx_XDECREF(__pyx_v_f);
21445 4 : __Pyx_XDECREF(__pyx_v_dns);
21446 4 : __Pyx_XDECREF(__pyx_v_dns_poly);
21447 4 : __Pyx_XDECREF(__pyx_v_dns_vinit);
21448 4 : __Pyx_XGIVEREF(__pyx_r);
21449 4 : __Pyx_RefNannyFinishContext();
21450 4 : return __pyx_r;
21451 : }
21452 :
21453 : /* "scipy/stats/_sobol.pyx":160
21454 : * @cython.boundscheck(False)
21455 : * @cython.wraparound(False)
21456 : * cdef int bit_length(uint_32_64 n) noexcept: # <<<<<<<<<<<<<<
21457 : * cdef int bits = 0
21458 : * cdef uint_32_64 nloc = n
21459 : */
21460 :
21461 1706 : static int __pyx_fuse_0__pyx_f_5scipy_5stats_6_sobol_bit_length(__pyx_t_5numpy_uint32_t __pyx_v_n) {
21462 1706 : int __pyx_v_bits;
21463 1706 : __pyx_t_5numpy_uint32_t __pyx_v_nloc;
21464 1706 : int __pyx_r;
21465 1706 : int __pyx_t_1;
21466 :
21467 : /* "scipy/stats/_sobol.pyx":161
21468 : * @cython.wraparound(False)
21469 : * cdef int bit_length(uint_32_64 n) noexcept:
21470 : * cdef int bits = 0 # <<<<<<<<<<<<<<
21471 : * cdef uint_32_64 nloc = n
21472 : * while nloc != 0:
21473 : */
21474 1706 : __pyx_v_bits = 0;
21475 :
21476 : /* "scipy/stats/_sobol.pyx":162
21477 : * cdef int bit_length(uint_32_64 n) noexcept:
21478 : * cdef int bits = 0
21479 : * cdef uint_32_64 nloc = n # <<<<<<<<<<<<<<
21480 : * while nloc != 0:
21481 : * nloc >>= 1
21482 : */
21483 1706 : __pyx_v_nloc = __pyx_v_n;
21484 :
21485 : /* "scipy/stats/_sobol.pyx":163
21486 : * cdef int bits = 0
21487 : * cdef uint_32_64 nloc = n
21488 : * while nloc != 0: # <<<<<<<<<<<<<<
21489 : * nloc >>= 1
21490 : * bits += 1
21491 : */
21492 36432 : while (1) {
21493 19069 : __pyx_t_1 = (__pyx_v_nloc != 0);
21494 19069 : if (!__pyx_t_1) break;
21495 :
21496 : /* "scipy/stats/_sobol.pyx":164
21497 : * cdef uint_32_64 nloc = n
21498 : * while nloc != 0:
21499 : * nloc >>= 1 # <<<<<<<<<<<<<<
21500 : * bits += 1
21501 : * return bits
21502 : */
21503 17363 : __pyx_v_nloc = (__pyx_v_nloc >> 1);
21504 :
21505 : /* "scipy/stats/_sobol.pyx":165
21506 : * while nloc != 0:
21507 : * nloc >>= 1
21508 : * bits += 1 # <<<<<<<<<<<<<<
21509 : * return bits
21510 : *
21511 : */
21512 17363 : __pyx_v_bits = (__pyx_v_bits + 1);
21513 : }
21514 :
21515 : /* "scipy/stats/_sobol.pyx":166
21516 : * nloc >>= 1
21517 : * bits += 1
21518 : * return bits # <<<<<<<<<<<<<<
21519 : *
21520 : *
21521 : */
21522 1706 : __pyx_r = __pyx_v_bits;
21523 1706 : goto __pyx_L0;
21524 :
21525 : /* "scipy/stats/_sobol.pyx":160
21526 : * @cython.boundscheck(False)
21527 : * @cython.wraparound(False)
21528 : * cdef int bit_length(uint_32_64 n) noexcept: # <<<<<<<<<<<<<<
21529 : * cdef int bits = 0
21530 : * cdef uint_32_64 nloc = n
21531 : */
21532 :
21533 : /* function exit code */
21534 1706 : __pyx_L0:;
21535 1706 : return __pyx_r;
21536 : }
21537 :
21538 46 : static int __pyx_fuse_1__pyx_f_5scipy_5stats_6_sobol_bit_length(__pyx_t_5numpy_uint64_t __pyx_v_n) {
21539 46 : int __pyx_v_bits;
21540 46 : __pyx_t_5numpy_uint64_t __pyx_v_nloc;
21541 46 : int __pyx_r;
21542 46 : int __pyx_t_1;
21543 :
21544 : /* "scipy/stats/_sobol.pyx":161
21545 : * @cython.wraparound(False)
21546 : * cdef int bit_length(uint_32_64 n) noexcept:
21547 : * cdef int bits = 0 # <<<<<<<<<<<<<<
21548 : * cdef uint_32_64 nloc = n
21549 : * while nloc != 0:
21550 : */
21551 46 : __pyx_v_bits = 0;
21552 :
21553 : /* "scipy/stats/_sobol.pyx":162
21554 : * cdef int bit_length(uint_32_64 n) noexcept:
21555 : * cdef int bits = 0
21556 : * cdef uint_32_64 nloc = n # <<<<<<<<<<<<<<
21557 : * while nloc != 0:
21558 : * nloc >>= 1
21559 : */
21560 46 : __pyx_v_nloc = __pyx_v_n;
21561 :
21562 : /* "scipy/stats/_sobol.pyx":163
21563 : * cdef int bits = 0
21564 : * cdef uint_32_64 nloc = n
21565 : * while nloc != 0: # <<<<<<<<<<<<<<
21566 : * nloc >>= 1
21567 : * bits += 1
21568 : */
21569 406 : while (1) {
21570 226 : __pyx_t_1 = (__pyx_v_nloc != 0);
21571 226 : if (!__pyx_t_1) break;
21572 :
21573 : /* "scipy/stats/_sobol.pyx":164
21574 : * cdef uint_32_64 nloc = n
21575 : * while nloc != 0:
21576 : * nloc >>= 1 # <<<<<<<<<<<<<<
21577 : * bits += 1
21578 : * return bits
21579 : */
21580 180 : __pyx_v_nloc = (__pyx_v_nloc >> 1);
21581 :
21582 : /* "scipy/stats/_sobol.pyx":165
21583 : * while nloc != 0:
21584 : * nloc >>= 1
21585 : * bits += 1 # <<<<<<<<<<<<<<
21586 : * return bits
21587 : *
21588 : */
21589 180 : __pyx_v_bits = (__pyx_v_bits + 1);
21590 : }
21591 :
21592 : /* "scipy/stats/_sobol.pyx":166
21593 : * nloc >>= 1
21594 : * bits += 1
21595 : * return bits # <<<<<<<<<<<<<<
21596 : *
21597 : *
21598 : */
21599 46 : __pyx_r = __pyx_v_bits;
21600 46 : goto __pyx_L0;
21601 :
21602 : /* "scipy/stats/_sobol.pyx":160
21603 : * @cython.boundscheck(False)
21604 : * @cython.wraparound(False)
21605 : * cdef int bit_length(uint_32_64 n) noexcept: # <<<<<<<<<<<<<<
21606 : * cdef int bits = 0
21607 : * cdef uint_32_64 nloc = n
21608 : */
21609 :
21610 : /* function exit code */
21611 46 : __pyx_L0:;
21612 46 : return __pyx_r;
21613 : }
21614 :
21615 : /* "scipy/stats/_sobol.pyx":171
21616 : * @cython.boundscheck(False)
21617 : * @cython.wraparound(False)
21618 : * cdef int low_0_bit(uint_32_64 x) noexcept nogil: # <<<<<<<<<<<<<<
21619 : * """Get the position of the right-most 0 bit for an integer.
21620 : *
21621 : */
21622 :
21623 : static int __pyx_fuse_0__pyx_f_5scipy_5stats_6_sobol_low_0_bit(__pyx_t_5numpy_uint32_t __pyx_v_x) {
21624 : int __pyx_v_i;
21625 : int __pyx_r;
21626 : int __pyx_t_1;
21627 :
21628 : /* "scipy/stats/_sobol.pyx":197
21629 : *
21630 : * """
21631 : * cdef int i = 0 # <<<<<<<<<<<<<<
21632 : * while x & (1 << i) != 0:
21633 : * i += 1
21634 : */
21635 : __pyx_v_i = 0;
21636 :
21637 : /* "scipy/stats/_sobol.pyx":198
21638 : * """
21639 : * cdef int i = 0
21640 : * while x & (1 << i) != 0: # <<<<<<<<<<<<<<
21641 : * i += 1
21642 : * return i + 1
21643 : */
21644 742958 : while (1) {
21645 496123 : __pyx_t_1 = ((__pyx_v_x & (1 << __pyx_v_i)) != 0);
21646 496123 : if (!__pyx_t_1) break;
21647 :
21648 : /* "scipy/stats/_sobol.pyx":199
21649 : * cdef int i = 0
21650 : * while x & (1 << i) != 0:
21651 : * i += 1 # <<<<<<<<<<<<<<
21652 : * return i + 1
21653 : *
21654 : */
21655 246835 : __pyx_v_i = (__pyx_v_i + 1);
21656 : }
21657 :
21658 : /* "scipy/stats/_sobol.pyx":200
21659 : * while x & (1 << i) != 0:
21660 : * i += 1
21661 : * return i + 1 # <<<<<<<<<<<<<<
21662 : *
21663 : *
21664 : */
21665 249288 : __pyx_r = (__pyx_v_i + 1);
21666 249288 : goto __pyx_L0;
21667 :
21668 : /* "scipy/stats/_sobol.pyx":171
21669 : * @cython.boundscheck(False)
21670 : * @cython.wraparound(False)
21671 : * cdef int low_0_bit(uint_32_64 x) noexcept nogil: # <<<<<<<<<<<<<<
21672 : * """Get the position of the right-most 0 bit for an integer.
21673 : *
21674 : */
21675 :
21676 : /* function exit code */
21677 249288 : __pyx_L0:;
21678 249288 : return __pyx_r;
21679 : }
21680 :
21681 : static int __pyx_fuse_1__pyx_f_5scipy_5stats_6_sobol_low_0_bit(__pyx_t_5numpy_uint64_t __pyx_v_x) {
21682 : int __pyx_v_i;
21683 : int __pyx_r;
21684 : int __pyx_t_1;
21685 :
21686 : /* "scipy/stats/_sobol.pyx":197
21687 : *
21688 : * """
21689 : * cdef int i = 0 # <<<<<<<<<<<<<<
21690 : * while x & (1 << i) != 0:
21691 : * i += 1
21692 : */
21693 : __pyx_v_i = 0;
21694 :
21695 : /* "scipy/stats/_sobol.pyx":198
21696 : * """
21697 : * cdef int i = 0
21698 : * while x & (1 << i) != 0: # <<<<<<<<<<<<<<
21699 : * i += 1
21700 : * return i + 1
21701 : */
21702 1621898 : while (1) {
21703 1081290 : __pyx_t_1 = ((__pyx_v_x & (1 << __pyx_v_i)) != 0);
21704 1081290 : if (!__pyx_t_1) break;
21705 :
21706 : /* "scipy/stats/_sobol.pyx":199
21707 : * cdef int i = 0
21708 : * while x & (1 << i) != 0:
21709 : * i += 1 # <<<<<<<<<<<<<<
21710 : * return i + 1
21711 : *
21712 : */
21713 540608 : __pyx_v_i = (__pyx_v_i + 1);
21714 : }
21715 :
21716 : /* "scipy/stats/_sobol.pyx":200
21717 : * while x & (1 << i) != 0:
21718 : * i += 1
21719 : * return i + 1 # <<<<<<<<<<<<<<
21720 : *
21721 : *
21722 : */
21723 540682 : __pyx_r = (__pyx_v_i + 1);
21724 540682 : goto __pyx_L0;
21725 :
21726 : /* "scipy/stats/_sobol.pyx":171
21727 : * @cython.boundscheck(False)
21728 : * @cython.wraparound(False)
21729 : * cdef int low_0_bit(uint_32_64 x) noexcept nogil: # <<<<<<<<<<<<<<
21730 : * """Get the position of the right-most 0 bit for an integer.
21731 : *
21732 : */
21733 :
21734 : /* function exit code */
21735 540682 : __pyx_L0:;
21736 540682 : return __pyx_r;
21737 : }
21738 :
21739 : /* "scipy/stats/_sobol.pyx":205
21740 : * @cython.boundscheck(False)
21741 : * @cython.wraparound(False)
21742 : * cdef int ibits(uint_32_64 x, const int pos, const int length) noexcept nogil: # <<<<<<<<<<<<<<
21743 : * """Extract a sequence of bits from the bit representation of an integer.
21744 : *
21745 : */
21746 :
21747 16713000 : static int __pyx_fuse_0__pyx_f_5scipy_5stats_6_sobol_ibits(__pyx_t_5numpy_uint32_t __pyx_v_x, int const __pyx_v_pos, int const __pyx_v_length) {
21748 16713000 : int __pyx_r;
21749 :
21750 : /* "scipy/stats/_sobol.pyx":239
21751 : *
21752 : * """
21753 : * return (x >> pos) & ((1 << length) - 1) # <<<<<<<<<<<<<<
21754 : *
21755 : *
21756 : */
21757 16713000 : __pyx_r = ((__pyx_v_x >> __pyx_v_pos) & ((1 << __pyx_v_length) - 1));
21758 16713000 : goto __pyx_L0;
21759 :
21760 : /* "scipy/stats/_sobol.pyx":205
21761 : * @cython.boundscheck(False)
21762 : * @cython.wraparound(False)
21763 : * cdef int ibits(uint_32_64 x, const int pos, const int length) noexcept nogil: # <<<<<<<<<<<<<<
21764 : * """Extract a sequence of bits from the bit representation of an integer.
21765 : *
21766 : */
21767 :
21768 : /* function exit code */
21769 16713000 : __pyx_L0:;
21770 16713000 : return __pyx_r;
21771 : }
21772 :
21773 14155776 : static int __pyx_fuse_1__pyx_f_5scipy_5stats_6_sobol_ibits(__pyx_t_5numpy_uint64_t __pyx_v_x, int const __pyx_v_pos, int const __pyx_v_length) {
21774 14155776 : int __pyx_r;
21775 :
21776 : /* "scipy/stats/_sobol.pyx":239
21777 : *
21778 : * """
21779 : * return (x >> pos) & ((1 << length) - 1) # <<<<<<<<<<<<<<
21780 : *
21781 : *
21782 : */
21783 14155776 : __pyx_r = ((__pyx_v_x >> __pyx_v_pos) & ((1 << __pyx_v_length) - 1));
21784 14155776 : goto __pyx_L0;
21785 :
21786 : /* "scipy/stats/_sobol.pyx":205
21787 : * @cython.boundscheck(False)
21788 : * @cython.wraparound(False)
21789 : * cdef int ibits(uint_32_64 x, const int pos, const int length) noexcept nogil: # <<<<<<<<<<<<<<
21790 : * """Extract a sequence of bits from the bit representation of an integer.
21791 : *
21792 : */
21793 :
21794 : /* function exit code */
21795 14155776 : __pyx_L0:;
21796 14155776 : return __pyx_r;
21797 : }
21798 :
21799 : /* "scipy/stats/_sobol.pyx":244
21800 : * @cython.boundscheck(False)
21801 : * @cython.wraparound(False)
21802 : * cpdef void _initialize_v( # <<<<<<<<<<<<<<
21803 : * uint_32_64[:, ::1] v, const int dim, const int bits
21804 : * ) noexcept:
21805 : */
21806 :
21807 : /* Python wrapper */
21808 : static PyObject *__pyx_pw_5scipy_5stats_6_sobol_5_initialize_v(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
21809 : PyDoc_STRVAR(__pyx_doc_5scipy_5stats_6_sobol_4_initialize_v, "Initialize matrix of size ``dim * bits`` with direction numbers.");
21810 : static PyMethodDef __pyx_mdef_5scipy_5stats_6_sobol_5_initialize_v = {"_initialize_v", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5scipy_5stats_6_sobol_5_initialize_v, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5scipy_5stats_6_sobol_4_initialize_v};
21811 394 : static PyObject *__pyx_pw_5scipy_5stats_6_sobol_5_initialize_v(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
21812 394 : PyObject *__pyx_v_signatures = 0;
21813 394 : PyObject *__pyx_v_args = 0;
21814 394 : PyObject *__pyx_v_kwargs = 0;
21815 394 : CYTHON_UNUSED PyObject *__pyx_v_defaults = 0;
21816 394 : PyObject *__pyx_v__fused_sigindex = 0;
21817 394 : CYTHON_UNUSED Py_ssize_t __pyx_nargs;
21818 394 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
21819 394 : PyObject* values[5] = {0,0,0,0,0};
21820 394 : int __pyx_lineno = 0;
21821 394 : const char *__pyx_filename = NULL;
21822 394 : int __pyx_clineno = 0;
21823 394 : PyObject *__pyx_r = 0;
21824 : __Pyx_RefNannyDeclarations
21825 394 : __Pyx_RefNannySetupContext("__pyx_fused_cpdef (wrapper)", 0);
21826 : #if CYTHON_ASSUME_SAFE_MACROS
21827 394 : __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
21828 : #else
21829 : __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
21830 : #endif
21831 394 : __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
21832 : {
21833 394 : PyObject **__pyx_pyargnames[] = {&__pyx_n_s_signatures,&__pyx_n_s_args,&__pyx_n_s_kwargs,&__pyx_n_s_defaults,&__pyx_n_s_fused_sigindex,0};
21834 394 : __pyx_defaults *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self);
21835 394 : values[4] = __Pyx_Arg_NewRef_VARARGS(__pyx_dynamic_args->__pyx_arg__fused_sigindex);
21836 394 : if (__pyx_kwds) {
21837 0 : Py_ssize_t kw_args;
21838 0 : switch (__pyx_nargs) {
21839 0 : case 5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
21840 0 : CYTHON_FALLTHROUGH;
21841 0 : case 4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
21842 0 : CYTHON_FALLTHROUGH;
21843 0 : case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
21844 0 : CYTHON_FALLTHROUGH;
21845 0 : case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
21846 0 : CYTHON_FALLTHROUGH;
21847 0 : case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
21848 0 : CYTHON_FALLTHROUGH;
21849 0 : case 0: break;
21850 0 : default: goto __pyx_L5_argtuple_error;
21851 : }
21852 0 : kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
21853 0 : switch (__pyx_nargs) {
21854 0 : case 0:
21855 0 : if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_signatures)) != 0)) {
21856 0 : (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
21857 0 : kw_args--;
21858 : }
21859 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 244, __pyx_L3_error)
21860 0 : else goto __pyx_L5_argtuple_error;
21861 0 : CYTHON_FALLTHROUGH;
21862 : case 1:
21863 0 : if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_args)) != 0)) {
21864 0 : (void)__Pyx_Arg_NewRef_VARARGS(values[1]);
21865 0 : kw_args--;
21866 : }
21867 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 244, __pyx_L3_error)
21868 : else {
21869 0 : __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 1); __PYX_ERR(0, 244, __pyx_L3_error)
21870 : }
21871 0 : CYTHON_FALLTHROUGH;
21872 : case 2:
21873 0 : if (likely((values[2] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_kwargs)) != 0)) {
21874 0 : (void)__Pyx_Arg_NewRef_VARARGS(values[2]);
21875 0 : kw_args--;
21876 : }
21877 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 244, __pyx_L3_error)
21878 : else {
21879 0 : __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 2); __PYX_ERR(0, 244, __pyx_L3_error)
21880 : }
21881 0 : CYTHON_FALLTHROUGH;
21882 : case 3:
21883 0 : if (likely((values[3] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_defaults)) != 0)) {
21884 0 : (void)__Pyx_Arg_NewRef_VARARGS(values[3]);
21885 0 : kw_args--;
21886 : }
21887 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 244, __pyx_L3_error)
21888 : else {
21889 0 : __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 3); __PYX_ERR(0, 244, __pyx_L3_error)
21890 : }
21891 0 : CYTHON_FALLTHROUGH;
21892 : case 4:
21893 0 : if (kw_args > 0) {
21894 0 : PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fused_sigindex);
21895 0 : if (value) { values[4] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
21896 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 244, __pyx_L3_error)
21897 : }
21898 : }
21899 0 : if (unlikely(kw_args > 0)) {
21900 0 : const Py_ssize_t kwd_pos_args = __pyx_nargs;
21901 0 : if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fused_cpdef") < 0)) __PYX_ERR(0, 244, __pyx_L3_error)
21902 : }
21903 : } else {
21904 394 : switch (__pyx_nargs) {
21905 0 : case 5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
21906 394 : CYTHON_FALLTHROUGH;
21907 394 : case 4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
21908 394 : values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
21909 394 : values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
21910 394 : values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
21911 394 : break;
21912 0 : default: goto __pyx_L5_argtuple_error;
21913 : }
21914 : }
21915 394 : __pyx_v_signatures = values[0];
21916 394 : __pyx_v_args = values[1];
21917 394 : __pyx_v_kwargs = values[2];
21918 394 : __pyx_v_defaults = values[3];
21919 394 : __pyx_v__fused_sigindex = values[4];
21920 : }
21921 394 : goto __pyx_L6_skip;
21922 0 : __pyx_L5_argtuple_error:;
21923 0 : __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 244, __pyx_L3_error)
21924 394 : __pyx_L6_skip:;
21925 394 : goto __pyx_L4_argument_unpacking_done;
21926 0 : __pyx_L3_error:;
21927 : {
21928 0 : Py_ssize_t __pyx_temp;
21929 0 : for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
21930 : __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
21931 : }
21932 : }
21933 0 : __Pyx_AddTraceback("scipy.stats._sobol.__pyx_fused_cpdef", __pyx_clineno, __pyx_lineno, __pyx_filename);
21934 0 : __Pyx_RefNannyFinishContext();
21935 0 : return NULL;
21936 394 : __pyx_L4_argument_unpacking_done:;
21937 394 : __pyx_r = __pyx_pf_5scipy_5stats_6_sobol_4_initialize_v(__pyx_self, __pyx_v_signatures, __pyx_v_args, __pyx_v_kwargs, __pyx_v_defaults, __pyx_v__fused_sigindex);
21938 :
21939 : /* function exit code */
21940 : {
21941 394 : Py_ssize_t __pyx_temp;
21942 394 : for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
21943 : __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
21944 : }
21945 : }
21946 : __Pyx_RefNannyFinishContext();
21947 : return __pyx_r;
21948 : }
21949 :
21950 394 : static PyObject *__pyx_pf_5scipy_5stats_6_sobol_4_initialize_v(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_signatures, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, CYTHON_UNUSED PyObject *__pyx_v_defaults, PyObject *__pyx_v__fused_sigindex) {
21951 394 : PyObject *__pyx_v_search_list = 0;
21952 394 : PyObject *__pyx_v_sigindex_node = 0;
21953 394 : PyObject *__pyx_v_dest_sig = NULL;
21954 394 : PyTypeObject *__pyx_v_ndarray = 0;
21955 394 : PyObject *__pyx_v_arg_as_memoryview = 0;
21956 394 : __Pyx_memviewslice __pyx_v_memslice;
21957 394 : Py_ssize_t __pyx_v_itemsize;
21958 394 : int __pyx_v_dtype_signed;
21959 394 : Py_UCS4 __pyx_v_kind;
21960 394 : int __pyx_v___pyx_fused_dtype_uint32__t_is_signed;
21961 394 : int __pyx_v___pyx_fused_dtype_uint64__t_is_signed;
21962 394 : PyObject *__pyx_v_arg = NULL;
21963 394 : PyObject *__pyx_v_dtype = NULL;
21964 394 : PyObject *__pyx_v_arg_base = NULL;
21965 394 : PyObject *__pyx_v_sig = NULL;
21966 394 : PyObject *__pyx_v_sig_series = NULL;
21967 394 : PyObject *__pyx_v_last_type = NULL;
21968 394 : PyObject *__pyx_v_sig_type = NULL;
21969 394 : PyObject *__pyx_v_sigindex_matches = NULL;
21970 394 : PyObject *__pyx_v_sigindex_candidates = NULL;
21971 394 : PyObject *__pyx_v_dst_type = NULL;
21972 394 : PyObject *__pyx_v_found_matches = NULL;
21973 394 : PyObject *__pyx_v_found_candidates = NULL;
21974 394 : PyObject *__pyx_v_sn = NULL;
21975 394 : PyObject *__pyx_v_type_match = NULL;
21976 394 : PyObject *__pyx_v_candidates = NULL;
21977 394 : PyObject *__pyx_r = NULL;
21978 : __Pyx_RefNannyDeclarations
21979 394 : PyObject *__pyx_t_1 = NULL;
21980 394 : int __pyx_t_2;
21981 394 : int __pyx_t_3;
21982 394 : int __pyx_t_4;
21983 394 : Py_ssize_t __pyx_t_5;
21984 394 : PyObject *__pyx_t_6 = NULL;
21985 394 : long __pyx_t_7;
21986 394 : PyObject *__pyx_t_8 = NULL;
21987 394 : PyObject *__pyx_t_9 = NULL;
21988 394 : PyObject *__pyx_t_10 = NULL;
21989 394 : int __pyx_t_11;
21990 394 : __Pyx_memviewslice __pyx_t_12;
21991 394 : PyObject *__pyx_t_13 = NULL;
21992 394 : Py_ssize_t __pyx_t_14;
21993 394 : int __pyx_t_15;
21994 394 : PyObject *__pyx_t_16 = NULL;
21995 394 : PyObject *__pyx_t_17 = NULL;
21996 394 : unsigned int __pyx_t_18;
21997 394 : Py_ssize_t __pyx_t_19;
21998 394 : int __pyx_t_20;
21999 394 : int __pyx_lineno = 0;
22000 394 : const char *__pyx_filename = NULL;
22001 394 : int __pyx_clineno = 0;
22002 394 : __Pyx_RefNannySetupContext("_initialize_v", 0);
22003 394 : __Pyx_INCREF(__pyx_v_kwargs);
22004 394 : __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 244, __pyx_L1_error)
22005 394 : __Pyx_GOTREF(__pyx_t_1);
22006 394 : __Pyx_INCREF(Py_None);
22007 394 : __Pyx_GIVEREF(Py_None);
22008 394 : if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, Py_None)) __PYX_ERR(0, 244, __pyx_L1_error);
22009 394 : __pyx_v_dest_sig = ((PyObject*)__pyx_t_1);
22010 394 : __pyx_t_1 = 0;
22011 394 : __pyx_t_3 = (__pyx_v_kwargs != Py_None);
22012 394 : if (__pyx_t_3) {
22013 394 : } else {
22014 0 : __pyx_t_2 = __pyx_t_3;
22015 0 : goto __pyx_L4_bool_binop_done;
22016 : }
22017 394 : __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 244, __pyx_L1_error)
22018 394 : __pyx_t_4 = (!__pyx_t_3);
22019 394 : __pyx_t_2 = __pyx_t_4;
22020 394 : __pyx_L4_bool_binop_done:;
22021 394 : if (__pyx_t_2) {
22022 0 : __Pyx_INCREF(Py_None);
22023 0 : __Pyx_DECREF_SET(__pyx_v_kwargs, Py_None);
22024 : }
22025 394 : __pyx_t_1 = ((PyObject *)__Pyx_ImportNumPyArrayTypeIfAvailable()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 244, __pyx_L1_error)
22026 394 : __Pyx_GOTREF(__pyx_t_1);
22027 394 : __pyx_v_ndarray = ((PyTypeObject*)__pyx_t_1);
22028 394 : __pyx_t_1 = 0;
22029 394 : __pyx_v_itemsize = -1L;
22030 394 : __pyx_v___pyx_fused_dtype_uint32__t_is_signed = (!(((__pyx_t_5numpy_uint32_t)-1L) > 0));
22031 394 : __pyx_v___pyx_fused_dtype_uint64__t_is_signed = (!(((__pyx_t_5numpy_uint64_t)-1L) > 0));
22032 394 : if (unlikely(__pyx_v_args == Py_None)) {
22033 0 : PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
22034 0 : __PYX_ERR(0, 244, __pyx_L1_error)
22035 : }
22036 394 : __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 244, __pyx_L1_error)
22037 394 : __pyx_t_2 = (0 < __pyx_t_5);
22038 394 : if (__pyx_t_2) {
22039 394 : if (unlikely(__pyx_v_args == Py_None)) {
22040 : PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
22041 : __PYX_ERR(0, 244, __pyx_L1_error)
22042 : }
22043 394 : __pyx_t_1 = PyTuple_GET_ITEM(((PyObject*)__pyx_v_args), 0);
22044 394 : __Pyx_INCREF(__pyx_t_1);
22045 394 : __pyx_v_arg = __pyx_t_1;
22046 394 : __pyx_t_1 = 0;
22047 394 : goto __pyx_L6;
22048 : }
22049 0 : __pyx_t_4 = (__pyx_v_kwargs != Py_None);
22050 0 : if (__pyx_t_4) {
22051 0 : } else {
22052 0 : __pyx_t_2 = __pyx_t_4;
22053 0 : goto __pyx_L7_bool_binop_done;
22054 : }
22055 0 : if (unlikely(__pyx_v_kwargs == Py_None)) {
22056 : PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
22057 : __PYX_ERR(0, 244, __pyx_L1_error)
22058 : }
22059 0 : __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_v, ((PyObject*)__pyx_v_kwargs), Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 244, __pyx_L1_error)
22060 : __pyx_t_2 = __pyx_t_4;
22061 0 : __pyx_L7_bool_binop_done:;
22062 0 : if (likely(__pyx_t_2)) {
22063 0 : if (unlikely(__pyx_v_kwargs == Py_None)) {
22064 0 : PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
22065 0 : __PYX_ERR(0, 244, __pyx_L1_error)
22066 : }
22067 0 : __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_kwargs), __pyx_n_s_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 244, __pyx_L1_error)
22068 0 : __Pyx_GOTREF(__pyx_t_1);
22069 0 : __pyx_v_arg = __pyx_t_1;
22070 0 : __pyx_t_1 = 0;
22071 0 : goto __pyx_L6;
22072 : }
22073 : /*else*/ {
22074 0 : if (unlikely(__pyx_v_args == Py_None)) {
22075 : PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
22076 : __PYX_ERR(0, 244, __pyx_L1_error)
22077 : }
22078 0 : __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 244, __pyx_L1_error)
22079 0 : __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 244, __pyx_L1_error)
22080 0 : __Pyx_GOTREF(__pyx_t_1);
22081 0 : __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 244, __pyx_L1_error)
22082 0 : __Pyx_GOTREF(__pyx_t_6);
22083 0 : __Pyx_INCREF(__pyx_int_3);
22084 0 : __Pyx_GIVEREF(__pyx_int_3);
22085 0 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_3)) __PYX_ERR(0, 244, __pyx_L1_error);
22086 0 : __Pyx_INCREF(__pyx_n_s_s);
22087 0 : __Pyx_GIVEREF(__pyx_n_s_s);
22088 0 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_s)) __PYX_ERR(0, 244, __pyx_L1_error);
22089 0 : __Pyx_GIVEREF(__pyx_t_1);
22090 0 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_1)) __PYX_ERR(0, 244, __pyx_L1_error);
22091 0 : __pyx_t_1 = 0;
22092 0 : __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Expected_at_least_d_argument_s_g, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 244, __pyx_L1_error)
22093 0 : __Pyx_GOTREF(__pyx_t_1);
22094 0 : __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
22095 0 : __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 244, __pyx_L1_error)
22096 0 : __Pyx_GOTREF(__pyx_t_6);
22097 0 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22098 0 : __Pyx_Raise(__pyx_t_6, 0, 0, 0);
22099 0 : __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
22100 0 : __PYX_ERR(0, 244, __pyx_L1_error)
22101 : }
22102 394 : __pyx_L6:;
22103 394 : while (1) {
22104 394 : __pyx_t_2 = (__pyx_v_ndarray != ((PyTypeObject*)Py_None));
22105 394 : if (__pyx_t_2) {
22106 394 : __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_arg, __pyx_v_ndarray);
22107 394 : if (__pyx_t_2) {
22108 394 : __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 244, __pyx_L1_error)
22109 394 : __Pyx_GOTREF(__pyx_t_6);
22110 394 : __pyx_v_dtype = __pyx_t_6;
22111 394 : __pyx_t_6 = 0;
22112 394 : goto __pyx_L12;
22113 : }
22114 0 : __pyx_t_2 = __pyx_memoryview_check(__pyx_v_arg);
22115 0 : if (__pyx_t_2) {
22116 0 : __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_base); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 244, __pyx_L1_error)
22117 0 : __Pyx_GOTREF(__pyx_t_6);
22118 0 : __pyx_v_arg_base = __pyx_t_6;
22119 0 : __pyx_t_6 = 0;
22120 0 : __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_arg_base, __pyx_v_ndarray);
22121 0 : if (__pyx_t_2) {
22122 0 : __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg_base, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 244, __pyx_L1_error)
22123 0 : __Pyx_GOTREF(__pyx_t_6);
22124 0 : __pyx_v_dtype = __pyx_t_6;
22125 0 : __pyx_t_6 = 0;
22126 0 : goto __pyx_L13;
22127 : }
22128 : /*else*/ {
22129 0 : __Pyx_INCREF(Py_None);
22130 : __pyx_v_dtype = Py_None;
22131 : }
22132 0 : __pyx_L13:;
22133 0 : goto __pyx_L12;
22134 : }
22135 : /*else*/ {
22136 0 : __Pyx_INCREF(Py_None);
22137 : __pyx_v_dtype = Py_None;
22138 : }
22139 394 : __pyx_L12:;
22140 394 : __pyx_v_itemsize = -1L;
22141 394 : __pyx_t_2 = (__pyx_v_dtype != Py_None);
22142 394 : if (__pyx_t_2) {
22143 394 : __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 244, __pyx_L1_error)
22144 394 : __Pyx_GOTREF(__pyx_t_6);
22145 394 : __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 244, __pyx_L1_error)
22146 394 : __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
22147 394 : __pyx_v_itemsize = __pyx_t_5;
22148 394 : __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 244, __pyx_L1_error)
22149 394 : __Pyx_GOTREF(__pyx_t_6);
22150 394 : __pyx_t_7 = __Pyx_PyObject_Ord(__pyx_t_6); if (unlikely(__pyx_t_7 == ((long)(long)(Py_UCS4)-1))) __PYX_ERR(0, 244, __pyx_L1_error)
22151 394 : __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
22152 394 : __pyx_v_kind = __pyx_t_7;
22153 394 : __pyx_v_dtype_signed = (__pyx_v_kind == 0x69);
22154 394 : switch (__pyx_v_kind) {
22155 394 : case 0x69:
22156 : case 0x75:
22157 394 : __pyx_t_4 = ((sizeof(__pyx_t_5numpy_uint32_t)) == __pyx_v_itemsize);
22158 394 : if (__pyx_t_4) {
22159 384 : } else {
22160 10 : __pyx_t_2 = __pyx_t_4;
22161 10 : goto __pyx_L16_bool_binop_done;
22162 : }
22163 384 : __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 244, __pyx_L1_error)
22164 384 : __Pyx_GOTREF(__pyx_t_6);
22165 384 : __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 244, __pyx_L1_error)
22166 384 : __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
22167 384 : __pyx_t_4 = (((Py_ssize_t)__pyx_t_5) == 2);
22168 384 : if (__pyx_t_4) {
22169 384 : } else {
22170 0 : __pyx_t_2 = __pyx_t_4;
22171 0 : goto __pyx_L16_bool_binop_done;
22172 : }
22173 384 : __pyx_t_4 = (!(__pyx_v___pyx_fused_dtype_uint32__t_is_signed ^ __pyx_v_dtype_signed));
22174 384 : __pyx_t_2 = __pyx_t_4;
22175 394 : __pyx_L16_bool_binop_done:;
22176 394 : if (__pyx_t_2) {
22177 384 : if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_uint32_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 244, __pyx_L1_error)
22178 384 : goto __pyx_L10_break;
22179 : }
22180 10 : __pyx_t_4 = ((sizeof(__pyx_t_5numpy_uint64_t)) == __pyx_v_itemsize);
22181 10 : if (__pyx_t_4) {
22182 10 : } else {
22183 0 : __pyx_t_2 = __pyx_t_4;
22184 0 : goto __pyx_L20_bool_binop_done;
22185 : }
22186 10 : __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 244, __pyx_L1_error)
22187 10 : __Pyx_GOTREF(__pyx_t_6);
22188 10 : __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 244, __pyx_L1_error)
22189 10 : __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
22190 10 : __pyx_t_4 = (((Py_ssize_t)__pyx_t_5) == 2);
22191 10 : if (__pyx_t_4) {
22192 10 : } else {
22193 0 : __pyx_t_2 = __pyx_t_4;
22194 0 : goto __pyx_L20_bool_binop_done;
22195 : }
22196 10 : __pyx_t_4 = (!(__pyx_v___pyx_fused_dtype_uint64__t_is_signed ^ __pyx_v_dtype_signed));
22197 10 : __pyx_t_2 = __pyx_t_4;
22198 10 : __pyx_L20_bool_binop_done:;
22199 10 : if (__pyx_t_2) {
22200 10 : if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_uint64_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 244, __pyx_L1_error)
22201 10 : goto __pyx_L10_break;
22202 : }
22203 : break;
22204 : case 0x66:
22205 : break;
22206 : case 99:
22207 : break;
22208 : case 79:
22209 : break;
22210 : default: break;
22211 : }
22212 : }
22213 : }
22214 0 : __pyx_t_2 = (__pyx_v_arg == Py_None);
22215 0 : if (__pyx_t_2) {
22216 0 : if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_uint32_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 244, __pyx_L1_error)
22217 0 : goto __pyx_L10_break;
22218 : }
22219 : {
22220 0 : __Pyx_PyThreadState_declare
22221 0 : __Pyx_PyThreadState_assign
22222 0 : __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
22223 0 : __Pyx_XGOTREF(__pyx_t_8);
22224 0 : __Pyx_XGOTREF(__pyx_t_9);
22225 0 : __Pyx_XGOTREF(__pyx_t_10);
22226 : /*try:*/ {
22227 0 : __pyx_t_6 = PyMemoryView_FromObject(__pyx_v_arg); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 244, __pyx_L24_error)
22228 0 : __Pyx_GOTREF(__pyx_t_6);
22229 0 : __pyx_v_arg_as_memoryview = ((PyObject*)__pyx_t_6);
22230 0 : __pyx_t_6 = 0;
22231 : }
22232 : /*else:*/ {
22233 0 : __pyx_t_4 = (__pyx_v_itemsize == -1L);
22234 0 : if (!__pyx_t_4) {
22235 0 : goto __pyx_L35_next_or;
22236 : } else {
22237 0 : }
22238 0 : __pyx_t_5 = __Pyx_PyMemoryView_Get_itemsize(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 244, __pyx_L26_except_error)
22239 0 : __pyx_t_4 = (__pyx_t_5 == (sizeof(__pyx_t_5numpy_uint32_t)));
22240 0 : if (!__pyx_t_4) {
22241 : } else {
22242 0 : goto __pyx_L34_next_and;
22243 : }
22244 0 : __pyx_L35_next_or:;
22245 0 : __pyx_t_4 = (__pyx_v_itemsize == (sizeof(__pyx_t_5numpy_uint32_t)));
22246 0 : if (__pyx_t_4) {
22247 : } else {
22248 0 : __pyx_t_2 = __pyx_t_4;
22249 0 : goto __pyx_L33_bool_binop_done;
22250 : }
22251 0 : __pyx_L34_next_and:;
22252 0 : __pyx_t_11 = __Pyx_PyMemoryView_Get_ndim(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 244, __pyx_L26_except_error)
22253 0 : __pyx_t_4 = (__pyx_t_11 == 2);
22254 0 : __pyx_t_2 = __pyx_t_4;
22255 0 : __pyx_L33_bool_binop_done:;
22256 0 : if (__pyx_t_2) {
22257 0 : __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_5numpy_uint32_t(__pyx_v_arg_as_memoryview, 0);
22258 0 : __pyx_v_memslice = __pyx_t_12;
22259 0 : __pyx_t_2 = (__pyx_v_memslice.memview != 0);
22260 0 : if (__pyx_t_2) {
22261 0 : __PYX_XCLEAR_MEMVIEW((&__pyx_v_memslice), 1);
22262 0 : if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_uint32_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 244, __pyx_L26_except_error)
22263 0 : goto __pyx_L29_try_break;
22264 : }
22265 : /*else*/ {
22266 0 : PyErr_Clear();
22267 : }
22268 : }
22269 0 : __pyx_t_4 = (__pyx_v_itemsize == -1L);
22270 0 : if (!__pyx_t_4) {
22271 0 : goto __pyx_L41_next_or;
22272 : } else {
22273 0 : }
22274 0 : __pyx_t_5 = __Pyx_PyMemoryView_Get_itemsize(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 244, __pyx_L26_except_error)
22275 0 : __pyx_t_4 = (__pyx_t_5 == (sizeof(__pyx_t_5numpy_uint64_t)));
22276 0 : if (!__pyx_t_4) {
22277 : } else {
22278 0 : goto __pyx_L40_next_and;
22279 : }
22280 0 : __pyx_L41_next_or:;
22281 0 : __pyx_t_4 = (__pyx_v_itemsize == (sizeof(__pyx_t_5numpy_uint64_t)));
22282 0 : if (__pyx_t_4) {
22283 : } else {
22284 0 : __pyx_t_2 = __pyx_t_4;
22285 0 : goto __pyx_L39_bool_binop_done;
22286 : }
22287 0 : __pyx_L40_next_and:;
22288 0 : __pyx_t_11 = __Pyx_PyMemoryView_Get_ndim(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 244, __pyx_L26_except_error)
22289 0 : __pyx_t_4 = (__pyx_t_11 == 2);
22290 0 : __pyx_t_2 = __pyx_t_4;
22291 0 : __pyx_L39_bool_binop_done:;
22292 0 : if (__pyx_t_2) {
22293 0 : __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_5numpy_uint64_t(__pyx_v_arg_as_memoryview, 0);
22294 0 : __pyx_v_memslice = __pyx_t_12;
22295 0 : __pyx_t_2 = (__pyx_v_memslice.memview != 0);
22296 0 : if (__pyx_t_2) {
22297 0 : __PYX_XCLEAR_MEMVIEW((&__pyx_v_memslice), 1);
22298 0 : if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_uint64_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 244, __pyx_L26_except_error)
22299 0 : goto __pyx_L29_try_break;
22300 : }
22301 : /*else*/ {
22302 0 : PyErr_Clear();
22303 : }
22304 : }
22305 : }
22306 0 : __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
22307 0 : __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
22308 0 : __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
22309 0 : goto __pyx_L31_try_end;
22310 0 : __pyx_L24_error:;
22311 0 : __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
22312 0 : __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
22313 0 : __pyx_t_11 = __Pyx_PyErr_ExceptionMatches2(__pyx_builtin_ValueError, __pyx_builtin_TypeError);
22314 0 : if (__pyx_t_11) {
22315 0 : __Pyx_AddTraceback("scipy.stats._sobol.__pyx_fused_cpdef", __pyx_clineno, __pyx_lineno, __pyx_filename);
22316 0 : if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_1, &__pyx_t_13) < 0) __PYX_ERR(0, 244, __pyx_L26_except_error)
22317 0 : __Pyx_XGOTREF(__pyx_t_6);
22318 0 : __Pyx_XGOTREF(__pyx_t_1);
22319 0 : __Pyx_XGOTREF(__pyx_t_13);
22320 0 : __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
22321 0 : __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
22322 0 : __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
22323 0 : goto __pyx_L25_exception_handled;
22324 : }
22325 0 : goto __pyx_L26_except_error;
22326 0 : __pyx_L26_except_error:;
22327 0 : __Pyx_XGIVEREF(__pyx_t_8);
22328 0 : __Pyx_XGIVEREF(__pyx_t_9);
22329 0 : __Pyx_XGIVEREF(__pyx_t_10);
22330 0 : __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
22331 0 : goto __pyx_L1_error;
22332 0 : __pyx_L29_try_break:;
22333 0 : __Pyx_XGIVEREF(__pyx_t_8);
22334 0 : __Pyx_XGIVEREF(__pyx_t_9);
22335 0 : __Pyx_XGIVEREF(__pyx_t_10);
22336 0 : __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
22337 0 : goto __pyx_L10_break;
22338 0 : __pyx_L25_exception_handled:;
22339 0 : __Pyx_XGIVEREF(__pyx_t_8);
22340 0 : __Pyx_XGIVEREF(__pyx_t_9);
22341 0 : __Pyx_XGIVEREF(__pyx_t_10);
22342 0 : __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
22343 0 : __pyx_L31_try_end:;
22344 : }
22345 0 : if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 244, __pyx_L1_error)
22346 0 : goto __pyx_L10_break;
22347 : }
22348 394 : __pyx_L10_break:;
22349 394 : __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v__fused_sigindex); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 244, __pyx_L1_error)
22350 394 : __pyx_t_4 = (!__pyx_t_2);
22351 394 : if (__pyx_t_4) {
22352 3 : __pyx_t_5 = 0;
22353 3 : if (unlikely(__pyx_v_signatures == Py_None)) {
22354 0 : PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
22355 0 : __PYX_ERR(0, 244, __pyx_L1_error)
22356 : }
22357 6 : __pyx_t_1 = __Pyx_dict_iterator(((PyObject*)__pyx_v_signatures), 1, ((PyObject *)NULL), (&__pyx_t_14), (&__pyx_t_11)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 244, __pyx_L1_error)
22358 3 : __Pyx_GOTREF(__pyx_t_1);
22359 3 : __Pyx_XDECREF(__pyx_t_13);
22360 3 : __pyx_t_13 = __pyx_t_1;
22361 3 : __pyx_t_1 = 0;
22362 9 : while (1) {
22363 9 : __pyx_t_15 = __Pyx_dict_iter_next(__pyx_t_13, __pyx_t_14, &__pyx_t_5, &__pyx_t_1, NULL, NULL, __pyx_t_11);
22364 9 : if (unlikely(__pyx_t_15 == 0)) break;
22365 6 : if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 244, __pyx_L1_error)
22366 6 : __Pyx_GOTREF(__pyx_t_1);
22367 6 : __Pyx_XDECREF_SET(__pyx_v_sig, __pyx_t_1);
22368 6 : __pyx_t_1 = 0;
22369 6 : __pyx_t_1 = __pyx_v__fused_sigindex;
22370 6 : __Pyx_INCREF(__pyx_t_1);
22371 6 : __Pyx_XDECREF_SET(__pyx_v_sigindex_node, ((PyObject*)__pyx_t_1));
22372 6 : __pyx_t_1 = 0;
22373 6 : __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_strip); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 244, __pyx_L1_error)
22374 6 : __Pyx_GOTREF(__pyx_t_16);
22375 6 : __pyx_t_17 = NULL;
22376 6 : __pyx_t_18 = 0;
22377 : #if CYTHON_UNPACK_METHODS
22378 6 : if (likely(PyMethod_Check(__pyx_t_16))) {
22379 0 : __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_16);
22380 0 : if (likely(__pyx_t_17)) {
22381 0 : PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
22382 0 : __Pyx_INCREF(__pyx_t_17);
22383 0 : __Pyx_INCREF(function);
22384 0 : __Pyx_DECREF_SET(__pyx_t_16, function);
22385 : __pyx_t_18 = 1;
22386 : }
22387 : }
22388 : #endif
22389 : {
22390 6 : PyObject *__pyx_callargs[2] = {__pyx_t_17, __pyx_kp_s__16};
22391 6 : __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_18, 1+__pyx_t_18);
22392 6 : __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
22393 6 : if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 244, __pyx_L1_error)
22394 6 : __Pyx_GOTREF(__pyx_t_6);
22395 6 : __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
22396 : }
22397 6 : __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_split); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 244, __pyx_L1_error)
22398 6 : __Pyx_GOTREF(__pyx_t_16);
22399 6 : __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
22400 6 : __pyx_t_6 = NULL;
22401 6 : __pyx_t_18 = 0;
22402 : #if CYTHON_UNPACK_METHODS
22403 6 : if (likely(PyMethod_Check(__pyx_t_16))) {
22404 0 : __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_16);
22405 0 : if (likely(__pyx_t_6)) {
22406 0 : PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
22407 0 : __Pyx_INCREF(__pyx_t_6);
22408 0 : __Pyx_INCREF(function);
22409 0 : __Pyx_DECREF_SET(__pyx_t_16, function);
22410 : __pyx_t_18 = 1;
22411 : }
22412 : }
22413 : #endif
22414 : {
22415 6 : PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_kp_s__17};
22416 6 : __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_18, 1+__pyx_t_18);
22417 6 : __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
22418 6 : if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 244, __pyx_L1_error)
22419 6 : __Pyx_GOTREF(__pyx_t_1);
22420 6 : __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
22421 : }
22422 12 : __pyx_t_16 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 244, __pyx_L1_error)
22423 6 : __Pyx_GOTREF(__pyx_t_16);
22424 6 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22425 6 : __pyx_t_19 = PyList_GET_SIZE(__pyx_t_16);
22426 6 : if (unlikely(__pyx_t_19 < 1)) {
22427 0 : __Pyx_RaiseNeedMoreValuesError(0+__pyx_t_19); __PYX_ERR(0, 244, __pyx_L1_error)
22428 : }
22429 : #if CYTHON_COMPILING_IN_CPYTHON
22430 6 : __pyx_t_6 = PyList_GET_ITEM(__pyx_t_16, __pyx_t_19-1);
22431 6 : ((PyVarObject*)__pyx_t_16)->ob_size--;
22432 : #else
22433 : __pyx_t_6 = PySequence_ITEM(__pyx_t_16, __pyx_t_19-1);
22434 : #endif
22435 6 : __Pyx_GOTREF(__pyx_t_6);
22436 : #if !CYTHON_COMPILING_IN_CPYTHON
22437 : __pyx_t_17 = PySequence_GetSlice(__pyx_t_16, 0, __pyx_t_19-1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 244, __pyx_L1_error)
22438 : __Pyx_GOTREF(__pyx_t_17);
22439 : __Pyx_DECREF(__pyx_t_16);
22440 : __pyx_t_16 = __pyx_t_17; __pyx_t_17 = NULL;
22441 : #else
22442 6 : CYTHON_UNUSED_VAR(__pyx_t_17);
22443 : #endif
22444 6 : __Pyx_XDECREF_SET(__pyx_v_sig_series, ((PyObject*)__pyx_t_16));
22445 6 : __pyx_t_16 = 0;
22446 6 : __Pyx_XDECREF_SET(__pyx_v_last_type, __pyx_t_6);
22447 6 : __pyx_t_6 = 0;
22448 6 : __pyx_t_1 = __pyx_v_sig_series; __Pyx_INCREF(__pyx_t_1);
22449 : __pyx_t_19 = 0;
22450 6 : for (;;) {
22451 : {
22452 6 : Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
22453 : #if !CYTHON_ASSUME_SAFE_MACROS
22454 : if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 244, __pyx_L1_error)
22455 : #endif
22456 6 : if (__pyx_t_19 >= __pyx_temp) break;
22457 : }
22458 : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
22459 0 : __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_19); __Pyx_INCREF(__pyx_t_6); __pyx_t_19++; if (unlikely((0 < 0))) __PYX_ERR(0, 244, __pyx_L1_error)
22460 : #else
22461 : __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_19); __pyx_t_19++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 244, __pyx_L1_error)
22462 : __Pyx_GOTREF(__pyx_t_6);
22463 : #endif
22464 0 : __Pyx_XDECREF_SET(__pyx_v_sig_type, __pyx_t_6);
22465 0 : __pyx_t_6 = 0;
22466 0 : if (unlikely(__pyx_v_sigindex_node == Py_None)) {
22467 0 : PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
22468 0 : __PYX_ERR(0, 244, __pyx_L1_error)
22469 : }
22470 0 : __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_v_sig_type, __pyx_v_sigindex_node, Py_NE)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 244, __pyx_L1_error)
22471 0 : if (__pyx_t_4) {
22472 0 : __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 244, __pyx_L1_error)
22473 0 : __Pyx_GOTREF(__pyx_t_6);
22474 0 : if (unlikely(__pyx_v_sigindex_node == Py_None)) {
22475 : PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
22476 : __PYX_ERR(0, 244, __pyx_L1_error)
22477 : }
22478 0 : if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_sig_type, __pyx_t_6) < 0))) __PYX_ERR(0, 244, __pyx_L1_error)
22479 0 : __Pyx_INCREF(__pyx_t_6);
22480 0 : __Pyx_DECREF_SET(__pyx_v_sigindex_node, __pyx_t_6);
22481 0 : __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
22482 0 : goto __pyx_L51;
22483 : }
22484 : /*else*/ {
22485 0 : if (unlikely(__pyx_v_sigindex_node == Py_None)) {
22486 : PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
22487 : __PYX_ERR(0, 244, __pyx_L1_error)
22488 : }
22489 0 : __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_sigindex_node, __pyx_v_sig_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 244, __pyx_L1_error)
22490 0 : __Pyx_GOTREF(__pyx_t_6);
22491 0 : __pyx_t_16 = __pyx_t_6;
22492 0 : __Pyx_INCREF(__pyx_t_16);
22493 0 : __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
22494 6 : __Pyx_DECREF_SET(__pyx_v_sigindex_node, ((PyObject*)__pyx_t_16));
22495 : __pyx_t_16 = 0;
22496 : }
22497 : __pyx_L51:;
22498 : }
22499 6 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22500 6 : if (unlikely(__pyx_v_sigindex_node == Py_None)) {
22501 0 : PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
22502 0 : __PYX_ERR(0, 244, __pyx_L1_error)
22503 : }
22504 6 : if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_last_type, __pyx_v_sig) < 0))) __PYX_ERR(0, 244, __pyx_L1_error)
22505 : }
22506 6 : __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
22507 : }
22508 394 : __pyx_t_13 = PyList_New(0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 244, __pyx_L1_error)
22509 394 : __Pyx_GOTREF(__pyx_t_13);
22510 394 : __pyx_v_sigindex_matches = ((PyObject*)__pyx_t_13);
22511 394 : __pyx_t_13 = 0;
22512 394 : __pyx_t_13 = PyList_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 244, __pyx_L1_error)
22513 394 : __Pyx_GOTREF(__pyx_t_13);
22514 394 : __Pyx_INCREF(__pyx_v__fused_sigindex);
22515 394 : __Pyx_GIVEREF(__pyx_v__fused_sigindex);
22516 394 : if (__Pyx_PyList_SET_ITEM(__pyx_t_13, 0, __pyx_v__fused_sigindex)) __PYX_ERR(0, 244, __pyx_L1_error);
22517 394 : __pyx_v_sigindex_candidates = ((PyObject*)__pyx_t_13);
22518 394 : __pyx_t_13 = 0;
22519 394 : __pyx_t_13 = __pyx_v_dest_sig; __Pyx_INCREF(__pyx_t_13);
22520 : __pyx_t_14 = 0;
22521 788 : for (;;) {
22522 : {
22523 788 : Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_13);
22524 : #if !CYTHON_ASSUME_SAFE_MACROS
22525 : if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 244, __pyx_L1_error)
22526 : #endif
22527 788 : if (__pyx_t_14 >= __pyx_temp) break;
22528 : }
22529 : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
22530 394 : __pyx_t_1 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_14); __Pyx_INCREF(__pyx_t_1); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(0, 244, __pyx_L1_error)
22531 : #else
22532 : __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_13, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 244, __pyx_L1_error)
22533 : __Pyx_GOTREF(__pyx_t_1);
22534 : #endif
22535 394 : __Pyx_XDECREF_SET(__pyx_v_dst_type, __pyx_t_1);
22536 394 : __pyx_t_1 = 0;
22537 394 : __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 244, __pyx_L1_error)
22538 394 : __Pyx_GOTREF(__pyx_t_1);
22539 394 : __Pyx_XDECREF_SET(__pyx_v_found_matches, ((PyObject*)__pyx_t_1));
22540 394 : __pyx_t_1 = 0;
22541 394 : __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 244, __pyx_L1_error)
22542 394 : __Pyx_GOTREF(__pyx_t_1);
22543 394 : __Pyx_XDECREF_SET(__pyx_v_found_candidates, ((PyObject*)__pyx_t_1));
22544 394 : __pyx_t_1 = 0;
22545 394 : __pyx_t_4 = (__pyx_v_dst_type == Py_None);
22546 394 : if (__pyx_t_4) {
22547 0 : __pyx_t_1 = __pyx_v_sigindex_matches; __Pyx_INCREF(__pyx_t_1);
22548 0 : __pyx_t_5 = 0;
22549 0 : for (;;) {
22550 : {
22551 0 : Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
22552 : #if !CYTHON_ASSUME_SAFE_MACROS
22553 : if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 244, __pyx_L1_error)
22554 : #endif
22555 0 : if (__pyx_t_5 >= __pyx_temp) break;
22556 : }
22557 : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
22558 0 : __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 244, __pyx_L1_error)
22559 : #else
22560 : __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 244, __pyx_L1_error)
22561 : __Pyx_GOTREF(__pyx_t_16);
22562 : #endif
22563 0 : __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_16);
22564 0 : __pyx_t_16 = 0;
22565 0 : if (unlikely(__pyx_v_sn == Py_None)) {
22566 0 : PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values");
22567 0 : __PYX_ERR(0, 244, __pyx_L1_error)
22568 : }
22569 0 : __pyx_t_16 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 244, __pyx_L1_error)
22570 0 : __Pyx_GOTREF(__pyx_t_16);
22571 0 : __pyx_t_20 = __Pyx_PyList_Extend(__pyx_v_found_matches, __pyx_t_16); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 244, __pyx_L1_error)
22572 0 : __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
22573 : }
22574 0 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22575 0 : __pyx_t_1 = __pyx_v_sigindex_candidates; __Pyx_INCREF(__pyx_t_1);
22576 0 : __pyx_t_5 = 0;
22577 0 : for (;;) {
22578 : {
22579 0 : Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
22580 : #if !CYTHON_ASSUME_SAFE_MACROS
22581 : if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 244, __pyx_L1_error)
22582 : #endif
22583 0 : if (__pyx_t_5 >= __pyx_temp) break;
22584 : }
22585 : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
22586 0 : __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 244, __pyx_L1_error)
22587 : #else
22588 : __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 244, __pyx_L1_error)
22589 : __Pyx_GOTREF(__pyx_t_16);
22590 : #endif
22591 0 : __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_16);
22592 0 : __pyx_t_16 = 0;
22593 0 : if (unlikely(__pyx_v_sn == Py_None)) {
22594 0 : PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values");
22595 0 : __PYX_ERR(0, 244, __pyx_L1_error)
22596 : }
22597 0 : __pyx_t_16 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 244, __pyx_L1_error)
22598 0 : __Pyx_GOTREF(__pyx_t_16);
22599 0 : __pyx_t_20 = __Pyx_PyList_Extend(__pyx_v_found_candidates, __pyx_t_16); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 244, __pyx_L1_error)
22600 0 : __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
22601 : }
22602 0 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22603 0 : goto __pyx_L55;
22604 : }
22605 : /*else*/ {
22606 394 : __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 244, __pyx_L1_error)
22607 394 : __Pyx_GOTREF(__pyx_t_1);
22608 394 : __Pyx_INCREF(__pyx_v_sigindex_matches);
22609 394 : __Pyx_GIVEREF(__pyx_v_sigindex_matches);
22610 394 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_sigindex_matches)) __PYX_ERR(0, 244, __pyx_L1_error);
22611 394 : __Pyx_INCREF(__pyx_v_sigindex_candidates);
22612 394 : __Pyx_GIVEREF(__pyx_v_sigindex_candidates);
22613 394 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_sigindex_candidates)) __PYX_ERR(0, 244, __pyx_L1_error);
22614 394 : __pyx_t_16 = __pyx_t_1; __Pyx_INCREF(__pyx_t_16);
22615 394 : __pyx_t_5 = 0;
22616 788 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22617 1970 : for (;;) {
22618 1182 : if (__pyx_t_5 >= 2) break;
22619 : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
22620 788 : __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_16, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 244, __pyx_L1_error)
22621 : #else
22622 : __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_16, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 244, __pyx_L1_error)
22623 : __Pyx_GOTREF(__pyx_t_1);
22624 : #endif
22625 788 : __Pyx_XDECREF_SET(__pyx_v_search_list, ((PyObject*)__pyx_t_1));
22626 788 : __pyx_t_1 = 0;
22627 788 : if (unlikely(__pyx_v_search_list == Py_None)) {
22628 0 : PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
22629 0 : __PYX_ERR(0, 244, __pyx_L1_error)
22630 : }
22631 788 : __pyx_t_1 = __pyx_v_search_list; __Pyx_INCREF(__pyx_t_1);
22632 : __pyx_t_19 = 0;
22633 1182 : for (;;) {
22634 : {
22635 1182 : Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
22636 : #if !CYTHON_ASSUME_SAFE_MACROS
22637 : if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 244, __pyx_L1_error)
22638 : #endif
22639 1182 : if (__pyx_t_19 >= __pyx_temp) break;
22640 : }
22641 : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
22642 394 : __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_19); __Pyx_INCREF(__pyx_t_6); __pyx_t_19++; if (unlikely((0 < 0))) __PYX_ERR(0, 244, __pyx_L1_error)
22643 : #else
22644 : __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_19); __pyx_t_19++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 244, __pyx_L1_error)
22645 : __Pyx_GOTREF(__pyx_t_6);
22646 : #endif
22647 394 : __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_6);
22648 394 : __pyx_t_6 = 0;
22649 394 : if (unlikely(__pyx_v_sn == Py_None)) {
22650 0 : PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
22651 0 : __PYX_ERR(0, 244, __pyx_L1_error)
22652 : }
22653 394 : __pyx_t_6 = __Pyx_PyDict_GetItemDefault(((PyObject*)__pyx_v_sn), __pyx_v_dst_type, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 244, __pyx_L1_error)
22654 394 : __Pyx_GOTREF(__pyx_t_6);
22655 394 : __Pyx_XDECREF_SET(__pyx_v_type_match, __pyx_t_6);
22656 394 : __pyx_t_6 = 0;
22657 394 : __pyx_t_4 = (__pyx_v_type_match != Py_None);
22658 394 : if (__pyx_t_4) {
22659 394 : __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_found_matches, __pyx_v_type_match); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 244, __pyx_L1_error)
22660 : }
22661 : }
22662 1576 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22663 : }
22664 394 : __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
22665 : }
22666 394 : __pyx_L55:;
22667 394 : __Pyx_INCREF(__pyx_v_found_matches);
22668 394 : __Pyx_DECREF_SET(__pyx_v_sigindex_matches, __pyx_v_found_matches);
22669 394 : __Pyx_INCREF(__pyx_v_found_candidates);
22670 394 : __Pyx_DECREF_SET(__pyx_v_sigindex_candidates, __pyx_v_found_candidates);
22671 394 : __pyx_t_2 = (PyList_GET_SIZE(__pyx_v_found_matches) != 0);
22672 394 : if (!__pyx_t_2) {
22673 0 : } else {
22674 394 : __pyx_t_4 = __pyx_t_2;
22675 394 : goto __pyx_L70_bool_binop_done;
22676 : }
22677 0 : __pyx_t_2 = (PyList_GET_SIZE(__pyx_v_found_candidates) != 0);
22678 0 : __pyx_t_4 = __pyx_t_2;
22679 394 : __pyx_L70_bool_binop_done:;
22680 394 : __pyx_t_2 = (!__pyx_t_4);
22681 394 : if (__pyx_t_2) {
22682 0 : goto __pyx_L54_break;
22683 : }
22684 : }
22685 394 : __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
22686 394 : goto __pyx_L72_for_end;
22687 0 : __pyx_L54_break:;
22688 0 : __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
22689 0 : goto __pyx_L72_for_end;
22690 394 : __pyx_L72_for_end:;
22691 394 : __Pyx_INCREF(__pyx_v_sigindex_matches);
22692 394 : __pyx_v_candidates = __pyx_v_sigindex_matches;
22693 394 : __pyx_t_2 = (PyList_GET_SIZE(__pyx_v_candidates) != 0);
22694 394 : __pyx_t_4 = (!__pyx_t_2);
22695 394 : if (unlikely(__pyx_t_4)) {
22696 0 : __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 244, __pyx_L1_error)
22697 0 : __Pyx_GOTREF(__pyx_t_13);
22698 0 : __Pyx_Raise(__pyx_t_13, 0, 0, 0);
22699 0 : __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
22700 0 : __PYX_ERR(0, 244, __pyx_L1_error)
22701 : }
22702 394 : __pyx_t_14 = __Pyx_PyList_GET_SIZE(__pyx_v_candidates); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 244, __pyx_L1_error)
22703 394 : __pyx_t_4 = (__pyx_t_14 > 1);
22704 394 : if (unlikely(__pyx_t_4)) {
22705 0 : __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 244, __pyx_L1_error)
22706 0 : __Pyx_GOTREF(__pyx_t_13);
22707 0 : __Pyx_Raise(__pyx_t_13, 0, 0, 0);
22708 0 : __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
22709 0 : __PYX_ERR(0, 244, __pyx_L1_error)
22710 : }
22711 : /*else*/ {
22712 394 : __Pyx_XDECREF(__pyx_r);
22713 394 : if (unlikely(__pyx_v_signatures == Py_None)) {
22714 0 : PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
22715 0 : __PYX_ERR(0, 244, __pyx_L1_error)
22716 : }
22717 394 : __pyx_t_13 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_signatures), PyList_GET_ITEM(__pyx_v_candidates, 0)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 244, __pyx_L1_error)
22718 394 : __Pyx_GOTREF(__pyx_t_13);
22719 394 : __pyx_r = __pyx_t_13;
22720 394 : __pyx_t_13 = 0;
22721 394 : goto __pyx_L0;
22722 : }
22723 :
22724 : /* function exit code */
22725 0 : __pyx_L1_error:;
22726 0 : __Pyx_XDECREF(__pyx_t_1);
22727 0 : __Pyx_XDECREF(__pyx_t_6);
22728 0 : __Pyx_XDECREF(__pyx_t_13);
22729 0 : __Pyx_XDECREF(__pyx_t_16);
22730 0 : __Pyx_XDECREF(__pyx_t_17);
22731 0 : __Pyx_AddTraceback("scipy.stats._sobol.__pyx_fused_cpdef", __pyx_clineno, __pyx_lineno, __pyx_filename);
22732 0 : __pyx_r = NULL;
22733 394 : __pyx_L0:;
22734 394 : __Pyx_XDECREF(__pyx_v_search_list);
22735 394 : __Pyx_XDECREF(__pyx_v_sigindex_node);
22736 394 : __Pyx_XDECREF(__pyx_v_dest_sig);
22737 394 : __Pyx_XDECREF((PyObject *)__pyx_v_ndarray);
22738 394 : __Pyx_XDECREF(__pyx_v_arg_as_memoryview);
22739 394 : __Pyx_XDECREF(__pyx_v_arg);
22740 394 : __Pyx_XDECREF(__pyx_v_dtype);
22741 394 : __Pyx_XDECREF(__pyx_v_arg_base);
22742 394 : __Pyx_XDECREF(__pyx_v_sig);
22743 394 : __Pyx_XDECREF(__pyx_v_sig_series);
22744 394 : __Pyx_XDECREF(__pyx_v_last_type);
22745 394 : __Pyx_XDECREF(__pyx_v_sig_type);
22746 394 : __Pyx_XDECREF(__pyx_v_sigindex_matches);
22747 394 : __Pyx_XDECREF(__pyx_v_sigindex_candidates);
22748 394 : __Pyx_XDECREF(__pyx_v_dst_type);
22749 394 : __Pyx_XDECREF(__pyx_v_found_matches);
22750 394 : __Pyx_XDECREF(__pyx_v_found_candidates);
22751 394 : __Pyx_XDECREF(__pyx_v_sn);
22752 394 : __Pyx_XDECREF(__pyx_v_type_match);
22753 394 : __Pyx_XDECREF(__pyx_v_candidates);
22754 394 : __Pyx_XDECREF(__pyx_v_kwargs);
22755 394 : __Pyx_XGIVEREF(__pyx_r);
22756 394 : __Pyx_RefNannyFinishContext();
22757 394 : return __pyx_r;
22758 : }
22759 :
22760 : static PyObject *__pyx_pw_5scipy_5stats_6_sobol_19__pyx_fuse_0_initialize_v(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
22761 : static PyObject *__pyx_pw_5scipy_5stats_6_sobol_5_initialize_v(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
22762 384 : static void __pyx_fuse_0__pyx_f_5scipy_5stats_6_sobol__initialize_v(__Pyx_memviewslice __pyx_v_v, int const __pyx_v_dim, int const __pyx_v_bits, CYTHON_UNUSED int __pyx_skip_dispatch) {
22763 384 : int __pyx_v_d;
22764 384 : int __pyx_v_i;
22765 384 : int __pyx_v_j;
22766 384 : int __pyx_v_k;
22767 384 : int __pyx_v_m;
22768 384 : __pyx_t_5numpy_uint32_t __pyx_v_p;
22769 384 : __pyx_t_5numpy_uint32_t __pyx_v_newv;
22770 384 : __pyx_t_5numpy_uint32_t __pyx_v_pow2;
22771 384 : __Pyx_memviewslice __pyx_v_poly = { 0, 0, { 0 }, { 0 }, { 0 } };
22772 384 : __Pyx_memviewslice __pyx_v_vinit = { 0, 0, { 0 }, { 0 }, { 0 } };
22773 : __Pyx_RefNannyDeclarations
22774 384 : PyObject *__pyx_t_1 = NULL;
22775 384 : PyObject *__pyx_t_2 = NULL;
22776 384 : PyObject *__pyx_t_3 = NULL;
22777 384 : PyObject *__pyx_t_4 = NULL;
22778 384 : PyObject *__pyx_t_5 = NULL;
22779 384 : unsigned int __pyx_t_6;
22780 384 : __Pyx_memviewslice __pyx_t_7 = { 0, 0, { 0 }, { 0 }, { 0 } };
22781 384 : __Pyx_memviewslice __pyx_t_8 = { 0, 0, { 0 }, { 0 }, { 0 } };
22782 384 : int __pyx_t_9;
22783 384 : int __pyx_t_10;
22784 384 : int __pyx_t_11;
22785 384 : int __pyx_t_12;
22786 384 : Py_ssize_t __pyx_t_13;
22787 384 : Py_ssize_t __pyx_t_14;
22788 384 : __Pyx_memviewslice __pyx_t_15 = { 0, 0, { 0 }, { 0 }, { 0 } };
22789 384 : int __pyx_t_16;
22790 384 : __Pyx_memviewslice __pyx_t_17 = { 0, 0, { 0 }, { 0 }, { 0 } };
22791 384 : int __pyx_t_18;
22792 384 : int __pyx_t_19;
22793 384 : int __pyx_t_20;
22794 384 : int __pyx_t_21;
22795 384 : int __pyx_t_22;
22796 384 : int __pyx_lineno = 0;
22797 384 : const char *__pyx_filename = NULL;
22798 384 : int __pyx_clineno = 0;
22799 384 : __Pyx_RefNannySetupContext("__pyx_fuse_0_initialize_v", 1);
22800 :
22801 : /* "scipy/stats/_sobol.pyx":250
22802 : * cdef int d, i, j, k, m
22803 : * cdef uint_32_64 p, newv, pow2
22804 : * cdef uint_32_64[:] poly = get_poly_vinit( # <<<<<<<<<<<<<<
22805 : * 'poly',
22806 : * np.uint32 if uint_32_64 is cnp.uint32_t else np.uint64
22807 : */
22808 384 : __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_get_poly_vinit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 250, __pyx_L1_error)
22809 384 : __Pyx_GOTREF(__pyx_t_2);
22810 :
22811 : /* "scipy/stats/_sobol.pyx":252
22812 : * cdef uint_32_64[:] poly = get_poly_vinit(
22813 : * 'poly',
22814 : * np.uint32 if uint_32_64 is cnp.uint32_t else np.uint64 # <<<<<<<<<<<<<<
22815 : * )
22816 : * cdef uint_32_64[:, ::1] vinit = get_poly_vinit(
22817 : */
22818 384 : if (1) {
22819 384 : __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 252, __pyx_L1_error)
22820 384 : __Pyx_GOTREF(__pyx_t_4);
22821 384 : __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_uint32); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 252, __pyx_L1_error)
22822 384 : __Pyx_GOTREF(__pyx_t_5);
22823 384 : __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22824 384 : __pyx_t_3 = __pyx_t_5;
22825 384 : __pyx_t_5 = 0;
22826 : } else {
22827 : __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 252, __pyx_L1_error)
22828 : __Pyx_GOTREF(__pyx_t_5);
22829 : __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_uint64); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 252, __pyx_L1_error)
22830 : __Pyx_GOTREF(__pyx_t_4);
22831 : __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
22832 : __pyx_t_3 = __pyx_t_4;
22833 : __pyx_t_4 = 0;
22834 : }
22835 384 : __pyx_t_4 = NULL;
22836 384 : __pyx_t_6 = 0;
22837 : #if CYTHON_UNPACK_METHODS
22838 384 : if (unlikely(PyMethod_Check(__pyx_t_2))) {
22839 0 : __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
22840 0 : if (likely(__pyx_t_4)) {
22841 0 : PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
22842 0 : __Pyx_INCREF(__pyx_t_4);
22843 0 : __Pyx_INCREF(function);
22844 0 : __Pyx_DECREF_SET(__pyx_t_2, function);
22845 : __pyx_t_6 = 1;
22846 : }
22847 : }
22848 : #endif
22849 : {
22850 384 : PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_n_u_poly, __pyx_t_3};
22851 384 : __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6);
22852 384 : __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
22853 384 : __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
22854 384 : if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 250, __pyx_L1_error)
22855 384 : __Pyx_GOTREF(__pyx_t_1);
22856 384 : __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22857 : }
22858 :
22859 : /* "scipy/stats/_sobol.pyx":250
22860 : * cdef int d, i, j, k, m
22861 : * cdef uint_32_64 p, newv, pow2
22862 : * cdef uint_32_64[:] poly = get_poly_vinit( # <<<<<<<<<<<<<<
22863 : * 'poly',
22864 : * np.uint32 if uint_32_64 is cnp.uint32_t else np.uint64
22865 : */
22866 384 : __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 250, __pyx_L1_error)
22867 384 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22868 384 : __pyx_v_poly = __pyx_t_7;
22869 384 : __pyx_t_7.memview = NULL;
22870 384 : __pyx_t_7.data = NULL;
22871 :
22872 : /* "scipy/stats/_sobol.pyx":254
22873 : * np.uint32 if uint_32_64 is cnp.uint32_t else np.uint64
22874 : * )
22875 : * cdef uint_32_64[:, ::1] vinit = get_poly_vinit( # <<<<<<<<<<<<<<
22876 : * 'vinit',
22877 : * np.uint32 if uint_32_64 is cnp.uint32_t else np.uint64
22878 : */
22879 384 : __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_get_poly_vinit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 254, __pyx_L1_error)
22880 384 : __Pyx_GOTREF(__pyx_t_2);
22881 :
22882 : /* "scipy/stats/_sobol.pyx":256
22883 : * cdef uint_32_64[:, ::1] vinit = get_poly_vinit(
22884 : * 'vinit',
22885 : * np.uint32 if uint_32_64 is cnp.uint32_t else np.uint64 # <<<<<<<<<<<<<<
22886 : * )
22887 : *
22888 : */
22889 384 : if (1) {
22890 384 : __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 256, __pyx_L1_error)
22891 384 : __Pyx_GOTREF(__pyx_t_4);
22892 384 : __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_uint32); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 256, __pyx_L1_error)
22893 384 : __Pyx_GOTREF(__pyx_t_5);
22894 384 : __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22895 384 : __pyx_t_3 = __pyx_t_5;
22896 384 : __pyx_t_5 = 0;
22897 : } else {
22898 : __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 256, __pyx_L1_error)
22899 : __Pyx_GOTREF(__pyx_t_5);
22900 : __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_uint64); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 256, __pyx_L1_error)
22901 : __Pyx_GOTREF(__pyx_t_4);
22902 : __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
22903 : __pyx_t_3 = __pyx_t_4;
22904 : __pyx_t_4 = 0;
22905 : }
22906 384 : __pyx_t_4 = NULL;
22907 384 : __pyx_t_6 = 0;
22908 : #if CYTHON_UNPACK_METHODS
22909 384 : if (unlikely(PyMethod_Check(__pyx_t_2))) {
22910 0 : __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
22911 0 : if (likely(__pyx_t_4)) {
22912 0 : PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
22913 0 : __Pyx_INCREF(__pyx_t_4);
22914 0 : __Pyx_INCREF(function);
22915 0 : __Pyx_DECREF_SET(__pyx_t_2, function);
22916 : __pyx_t_6 = 1;
22917 : }
22918 : }
22919 : #endif
22920 : {
22921 384 : PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_n_u_vinit, __pyx_t_3};
22922 384 : __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6);
22923 384 : __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
22924 384 : __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
22925 384 : if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 254, __pyx_L1_error)
22926 384 : __Pyx_GOTREF(__pyx_t_1);
22927 384 : __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22928 : }
22929 :
22930 : /* "scipy/stats/_sobol.pyx":254
22931 : * np.uint32 if uint_32_64 is cnp.uint32_t else np.uint64
22932 : * )
22933 : * cdef uint_32_64[:, ::1] vinit = get_poly_vinit( # <<<<<<<<<<<<<<
22934 : * 'vinit',
22935 : * np.uint32 if uint_32_64 is cnp.uint32_t else np.uint64
22936 : */
22937 384 : __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_5numpy_uint32_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 254, __pyx_L1_error)
22938 384 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22939 384 : __pyx_v_vinit = __pyx_t_8;
22940 384 : __pyx_t_8.memview = NULL;
22941 384 : __pyx_t_8.data = NULL;
22942 :
22943 : /* "scipy/stats/_sobol.pyx":259
22944 : * )
22945 : *
22946 : * if dim == 0: # <<<<<<<<<<<<<<
22947 : * return
22948 : *
22949 : */
22950 384 : __pyx_t_9 = (__pyx_v_dim == 0);
22951 384 : if (__pyx_t_9) {
22952 :
22953 : /* "scipy/stats/_sobol.pyx":260
22954 : *
22955 : * if dim == 0:
22956 : * return # <<<<<<<<<<<<<<
22957 : *
22958 : * # first row of v is all 1s
22959 : */
22960 3 : goto __pyx_L0;
22961 :
22962 : /* "scipy/stats/_sobol.pyx":259
22963 : * )
22964 : *
22965 : * if dim == 0: # <<<<<<<<<<<<<<
22966 : * return
22967 : *
22968 : */
22969 : }
22970 :
22971 : /* "scipy/stats/_sobol.pyx":263
22972 : *
22973 : * # first row of v is all 1s
22974 : * for i in range(bits): # <<<<<<<<<<<<<<
22975 : * v[0, i] = 1
22976 : *
22977 : */
22978 : __pyx_t_10 = __pyx_v_bits;
22979 : __pyx_t_11 = __pyx_t_10;
22980 11756 : for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
22981 11375 : __pyx_v_i = __pyx_t_12;
22982 :
22983 : /* "scipy/stats/_sobol.pyx":264
22984 : * # first row of v is all 1s
22985 : * for i in range(bits):
22986 : * v[0, i] = 1 # <<<<<<<<<<<<<<
22987 : *
22988 : * # Remaining rows of v (row 2 through dim, indexed by [1:dim])
22989 : */
22990 11375 : __pyx_t_13 = 0;
22991 11375 : __pyx_t_14 = __pyx_v_i;
22992 11375 : *((__pyx_t_5numpy_uint32_t *) ( /* dim=1 */ ((char *) (((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_v.data + __pyx_t_13 * __pyx_v_v.strides[0]) )) + __pyx_t_14)) )) = 1;
22993 : }
22994 :
22995 : /* "scipy/stats/_sobol.pyx":267
22996 : *
22997 : * # Remaining rows of v (row 2 through dim, indexed by [1:dim])
22998 : * for d in range(1, dim): # <<<<<<<<<<<<<<
22999 : * p = poly[d]
23000 : * m = bit_length(p) - 1
23001 : */
23002 : __pyx_t_10 = __pyx_v_dim;
23003 : __pyx_t_11 = __pyx_t_10;
23004 2087 : for (__pyx_t_12 = 1; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
23005 1706 : __pyx_v_d = __pyx_t_12;
23006 :
23007 : /* "scipy/stats/_sobol.pyx":268
23008 : * # Remaining rows of v (row 2 through dim, indexed by [1:dim])
23009 : * for d in range(1, dim):
23010 : * p = poly[d] # <<<<<<<<<<<<<<
23011 : * m = bit_length(p) - 1
23012 : *
23013 : */
23014 1706 : __pyx_t_14 = __pyx_v_d;
23015 1706 : __pyx_v_p = (*((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_poly.data + __pyx_t_14 * __pyx_v_poly.strides[0]) )));
23016 :
23017 : /* "scipy/stats/_sobol.pyx":269
23018 : * for d in range(1, dim):
23019 : * p = poly[d]
23020 : * m = bit_length(p) - 1 # <<<<<<<<<<<<<<
23021 : *
23022 : * # First m elements of row d comes from vinit
23023 : */
23024 1706 : __pyx_v_m = (__pyx_fuse_0__pyx_f_5scipy_5stats_6_sobol_bit_length(__pyx_v_p) - 1);
23025 :
23026 : /* "scipy/stats/_sobol.pyx":272
23027 : *
23028 : * # First m elements of row d comes from vinit
23029 : * v[d, :m] = vinit[d, :m] # <<<<<<<<<<<<<<
23030 : *
23031 : * # Fill in remaining elements of v as in Section 2 (top of pg. 90) of:
23032 : */
23033 1706 : __pyx_t_15.data = __pyx_v_vinit.data;
23034 1706 : __pyx_t_15.memview = __pyx_v_vinit.memview;
23035 1706 : __PYX_INC_MEMVIEW(&__pyx_t_15, 1);
23036 : {
23037 1706 : Py_ssize_t __pyx_tmp_idx = __pyx_v_d;
23038 1706 : Py_ssize_t __pyx_tmp_stride = __pyx_v_vinit.strides[0];
23039 1706 : __pyx_t_15.data += __pyx_tmp_idx * __pyx_tmp_stride;
23040 : }
23041 :
23042 1706 : __pyx_t_16 = -1;
23043 1706 : if (unlikely(__pyx_memoryview_slice_memviewslice(
23044 : &__pyx_t_15,
23045 : __pyx_v_vinit.shape[1], __pyx_v_vinit.strides[1], __pyx_v_vinit.suboffsets[1],
23046 : 1,
23047 : 0,
23048 : &__pyx_t_16,
23049 : 0,
23050 : __pyx_v_m,
23051 : 0,
23052 : 0,
23053 : 1,
23054 : 0,
23055 : 1) < 0))
23056 : {
23057 0 : __PYX_ERR(0, 272, __pyx_L1_error)
23058 : }
23059 :
23060 1706 : __pyx_t_17.data = __pyx_v_v.data;
23061 1706 : __pyx_t_17.memview = __pyx_v_v.memview;
23062 1706 : __PYX_INC_MEMVIEW(&__pyx_t_17, 1);
23063 : {
23064 1706 : Py_ssize_t __pyx_tmp_idx = __pyx_v_d;
23065 1706 : Py_ssize_t __pyx_tmp_stride = __pyx_v_v.strides[0];
23066 1706 : __pyx_t_17.data += __pyx_tmp_idx * __pyx_tmp_stride;
23067 : }
23068 :
23069 1706 : __pyx_t_16 = -1;
23070 1706 : if (unlikely(__pyx_memoryview_slice_memviewslice(
23071 : &__pyx_t_17,
23072 : __pyx_v_v.shape[1], __pyx_v_v.strides[1], __pyx_v_v.suboffsets[1],
23073 : 1,
23074 : 0,
23075 : &__pyx_t_16,
23076 : 0,
23077 : __pyx_v_m,
23078 : 0,
23079 : 0,
23080 : 1,
23081 : 0,
23082 : 1) < 0))
23083 : {
23084 0 : __PYX_ERR(0, 272, __pyx_L1_error)
23085 : }
23086 :
23087 1706 : if (unlikely((__pyx_memoryview_copy_contents(__pyx_t_15, __pyx_t_17, 1, 1, 0) < 0))) __PYX_ERR(0, 272, __pyx_L1_error)
23088 1706 : __PYX_XCLEAR_MEMVIEW(&__pyx_t_17, 1);
23089 1706 : __pyx_t_17.memview = NULL; __pyx_t_17.data = NULL;
23090 1706 : __PYX_XCLEAR_MEMVIEW(&__pyx_t_15, 1);
23091 1706 : __pyx_t_15.memview = NULL; __pyx_t_15.data = NULL;
23092 :
23093 : /* "scipy/stats/_sobol.pyx":280
23094 : * # Math. Softw., 14(1):88-100, Mar. 1988.
23095 : * #
23096 : * for j in range(m, bits): # <<<<<<<<<<<<<<
23097 : * newv = v[d, j - m]
23098 : * pow2 = 1
23099 : */
23100 1706 : __pyx_t_16 = __pyx_v_bits;
23101 1706 : __pyx_t_18 = __pyx_t_16;
23102 37174 : for (__pyx_t_19 = __pyx_v_m; __pyx_t_19 < __pyx_t_18; __pyx_t_19+=1) {
23103 35468 : __pyx_v_j = __pyx_t_19;
23104 :
23105 : /* "scipy/stats/_sobol.pyx":281
23106 : * #
23107 : * for j in range(m, bits):
23108 : * newv = v[d, j - m] # <<<<<<<<<<<<<<
23109 : * pow2 = 1
23110 : * for k in range(m):
23111 : */
23112 35468 : __pyx_t_14 = __pyx_v_d;
23113 35468 : __pyx_t_13 = (__pyx_v_j - __pyx_v_m);
23114 35468 : __pyx_v_newv = (*((__pyx_t_5numpy_uint32_t *) ( /* dim=1 */ ((char *) (((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_v.data + __pyx_t_14 * __pyx_v_v.strides[0]) )) + __pyx_t_13)) )));
23115 :
23116 : /* "scipy/stats/_sobol.pyx":282
23117 : * for j in range(m, bits):
23118 : * newv = v[d, j - m]
23119 : * pow2 = 1 # <<<<<<<<<<<<<<
23120 : * for k in range(m):
23121 : * pow2 = pow2 << 1
23122 : */
23123 35468 : __pyx_v_pow2 = 1;
23124 :
23125 : /* "scipy/stats/_sobol.pyx":283
23126 : * newv = v[d, j - m]
23127 : * pow2 = 1
23128 : * for k in range(m): # <<<<<<<<<<<<<<
23129 : * pow2 = pow2 << 1
23130 : * if (p >> (m - 1 - k)) & 1:
23131 : */
23132 35468 : __pyx_t_20 = __pyx_v_m;
23133 35468 : __pyx_t_21 = __pyx_t_20;
23134 327942 : for (__pyx_t_22 = 0; __pyx_t_22 < __pyx_t_21; __pyx_t_22+=1) {
23135 292474 : __pyx_v_k = __pyx_t_22;
23136 :
23137 : /* "scipy/stats/_sobol.pyx":284
23138 : * pow2 = 1
23139 : * for k in range(m):
23140 : * pow2 = pow2 << 1 # <<<<<<<<<<<<<<
23141 : * if (p >> (m - 1 - k)) & 1:
23142 : * newv = newv ^ (pow2 * v[d, j - k - 1])
23143 : */
23144 292474 : __pyx_v_pow2 = (__pyx_v_pow2 << 1);
23145 :
23146 : /* "scipy/stats/_sobol.pyx":285
23147 : * for k in range(m):
23148 : * pow2 = pow2 << 1
23149 : * if (p >> (m - 1 - k)) & 1: # <<<<<<<<<<<<<<
23150 : * newv = newv ^ (pow2 * v[d, j - k - 1])
23151 : * v[d, j] = newv
23152 : */
23153 292474 : __pyx_t_9 = (((__pyx_v_p >> ((__pyx_v_m - 1) - __pyx_v_k)) & 1) != 0);
23154 292474 : if (__pyx_t_9) {
23155 :
23156 : /* "scipy/stats/_sobol.pyx":286
23157 : * pow2 = pow2 << 1
23158 : * if (p >> (m - 1 - k)) & 1:
23159 : * newv = newv ^ (pow2 * v[d, j - k - 1]) # <<<<<<<<<<<<<<
23160 : * v[d, j] = newv
23161 : *
23162 : */
23163 165006 : __pyx_t_13 = __pyx_v_d;
23164 165006 : __pyx_t_14 = ((__pyx_v_j - __pyx_v_k) - 1);
23165 165006 : __pyx_v_newv = (__pyx_v_newv ^ (__pyx_v_pow2 * (*((__pyx_t_5numpy_uint32_t *) ( /* dim=1 */ ((char *) (((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_v.data + __pyx_t_13 * __pyx_v_v.strides[0]) )) + __pyx_t_14)) )))));
23166 :
23167 : /* "scipy/stats/_sobol.pyx":285
23168 : * for k in range(m):
23169 : * pow2 = pow2 << 1
23170 : * if (p >> (m - 1 - k)) & 1: # <<<<<<<<<<<<<<
23171 : * newv = newv ^ (pow2 * v[d, j - k - 1])
23172 : * v[d, j] = newv
23173 : */
23174 : }
23175 : }
23176 :
23177 : /* "scipy/stats/_sobol.pyx":287
23178 : * if (p >> (m - 1 - k)) & 1:
23179 : * newv = newv ^ (pow2 * v[d, j - k - 1])
23180 : * v[d, j] = newv # <<<<<<<<<<<<<<
23181 : *
23182 : * # Multiply each column of v by power of 2:
23183 : */
23184 35468 : __pyx_t_14 = __pyx_v_d;
23185 35468 : __pyx_t_13 = __pyx_v_j;
23186 35468 : *((__pyx_t_5numpy_uint32_t *) ( /* dim=1 */ ((char *) (((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_v.data + __pyx_t_14 * __pyx_v_v.strides[0]) )) + __pyx_t_13)) )) = __pyx_v_newv;
23187 : }
23188 : }
23189 :
23190 : /* "scipy/stats/_sobol.pyx":291
23191 : * # Multiply each column of v by power of 2:
23192 : * # v * [2^(bits-1), 2^(bits-2),..., 2, 1]
23193 : * pow2 = 1 # <<<<<<<<<<<<<<
23194 : * for d in range(bits):
23195 : * for i in range(dim):
23196 : */
23197 : __pyx_v_pow2 = 1;
23198 :
23199 : /* "scipy/stats/_sobol.pyx":292
23200 : * # v * [2^(bits-1), 2^(bits-2),..., 2, 1]
23201 : * pow2 = 1
23202 : * for d in range(bits): # <<<<<<<<<<<<<<
23203 : * for i in range(dim):
23204 : * v[i, bits - 1 - d] *= pow2
23205 : */
23206 : __pyx_t_10 = __pyx_v_bits;
23207 : __pyx_t_11 = __pyx_t_10;
23208 11756 : for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
23209 73875 : __pyx_v_d = __pyx_t_12;
23210 :
23211 : /* "scipy/stats/_sobol.pyx":293
23212 : * pow2 = 1
23213 : * for d in range(bits):
23214 : * for i in range(dim): # <<<<<<<<<<<<<<
23215 : * v[i, bits - 1 - d] *= pow2
23216 : * pow2 = pow2 << 1
23217 : */
23218 : __pyx_t_16 = __pyx_v_dim;
23219 73875 : __pyx_t_18 = __pyx_t_16;
23220 73875 : for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_18; __pyx_t_19+=1) {
23221 62500 : __pyx_v_i = __pyx_t_19;
23222 :
23223 : /* "scipy/stats/_sobol.pyx":294
23224 : * for d in range(bits):
23225 : * for i in range(dim):
23226 : * v[i, bits - 1 - d] *= pow2 # <<<<<<<<<<<<<<
23227 : * pow2 = pow2 << 1
23228 : *
23229 : */
23230 62500 : __pyx_t_13 = __pyx_v_i;
23231 62500 : __pyx_t_14 = ((__pyx_v_bits - 1) - __pyx_v_d);
23232 62500 : *((__pyx_t_5numpy_uint32_t *) ( /* dim=1 */ ((char *) (((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_v.data + __pyx_t_13 * __pyx_v_v.strides[0]) )) + __pyx_t_14)) )) *= __pyx_v_pow2;
23233 : }
23234 :
23235 : /* "scipy/stats/_sobol.pyx":295
23236 : * for i in range(dim):
23237 : * v[i, bits - 1 - d] *= pow2
23238 : * pow2 = pow2 << 1 # <<<<<<<<<<<<<<
23239 : *
23240 : *
23241 : */
23242 11375 : __pyx_v_pow2 = (__pyx_v_pow2 << 1);
23243 : }
23244 :
23245 : /* "scipy/stats/_sobol.pyx":244
23246 : * @cython.boundscheck(False)
23247 : * @cython.wraparound(False)
23248 : * cpdef void _initialize_v( # <<<<<<<<<<<<<<
23249 : * uint_32_64[:, ::1] v, const int dim, const int bits
23250 : * ) noexcept:
23251 : */
23252 :
23253 : /* function exit code */
23254 381 : goto __pyx_L0;
23255 0 : __pyx_L1_error:;
23256 0 : __Pyx_XDECREF(__pyx_t_1);
23257 0 : __Pyx_XDECREF(__pyx_t_2);
23258 0 : __Pyx_XDECREF(__pyx_t_3);
23259 0 : __Pyx_XDECREF(__pyx_t_4);
23260 0 : __Pyx_XDECREF(__pyx_t_5);
23261 0 : __PYX_XCLEAR_MEMVIEW(&__pyx_t_7, 1);
23262 0 : __PYX_XCLEAR_MEMVIEW(&__pyx_t_8, 1);
23263 0 : __PYX_XCLEAR_MEMVIEW(&__pyx_t_15, 1);
23264 0 : __PYX_XCLEAR_MEMVIEW(&__pyx_t_17, 1);
23265 0 : __Pyx_WriteUnraisable("scipy.stats._sobol._initialize_v", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
23266 384 : __pyx_L0:;
23267 384 : __PYX_XCLEAR_MEMVIEW(&__pyx_v_poly, 1);
23268 384 : __PYX_XCLEAR_MEMVIEW(&__pyx_v_vinit, 1);
23269 384 : __Pyx_RefNannyFinishContext();
23270 384 : }
23271 :
23272 : /* Python wrapper */
23273 : static PyObject *__pyx_pw_5scipy_5stats_6_sobol_19__pyx_fuse_0_initialize_v(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
23274 : static PyMethodDef __pyx_fuse_0__pyx_mdef_5scipy_5stats_6_sobol_19__pyx_fuse_0_initialize_v = {"__pyx_fuse_0_initialize_v", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5scipy_5stats_6_sobol_19__pyx_fuse_0_initialize_v, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5scipy_5stats_6_sobol_4_initialize_v};
23275 384 : static PyObject *__pyx_pw_5scipy_5stats_6_sobol_19__pyx_fuse_0_initialize_v(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
23276 384 : __Pyx_memviewslice __pyx_v_v = { 0, 0, { 0 }, { 0 }, { 0 } };
23277 384 : int __pyx_v_dim;
23278 384 : int __pyx_v_bits;
23279 384 : CYTHON_UNUSED Py_ssize_t __pyx_nargs;
23280 384 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
23281 384 : PyObject* values[3] = {0,0,0};
23282 384 : int __pyx_lineno = 0;
23283 384 : const char *__pyx_filename = NULL;
23284 384 : int __pyx_clineno = 0;
23285 384 : PyObject *__pyx_r = 0;
23286 : __Pyx_RefNannyDeclarations
23287 384 : __Pyx_RefNannySetupContext("__pyx_fuse_0_initialize_v (wrapper)", 0);
23288 : #if CYTHON_ASSUME_SAFE_MACROS
23289 384 : __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
23290 : #else
23291 : __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
23292 : #endif
23293 384 : __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
23294 : {
23295 384 : PyObject **__pyx_pyargnames[] = {&__pyx_n_s_v,&__pyx_n_s_dim,&__pyx_n_s_bits,0};
23296 384 : if (__pyx_kwds) {
23297 384 : Py_ssize_t kw_args;
23298 384 : switch (__pyx_nargs) {
23299 0 : case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
23300 0 : CYTHON_FALLTHROUGH;
23301 0 : case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
23302 384 : CYTHON_FALLTHROUGH;
23303 384 : case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
23304 384 : CYTHON_FALLTHROUGH;
23305 384 : case 0: break;
23306 0 : default: goto __pyx_L5_argtuple_error;
23307 : }
23308 384 : kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
23309 384 : switch (__pyx_nargs) {
23310 0 : case 0:
23311 0 : if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_v)) != 0)) {
23312 0 : (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
23313 0 : kw_args--;
23314 : }
23315 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 244, __pyx_L3_error)
23316 0 : else goto __pyx_L5_argtuple_error;
23317 384 : CYTHON_FALLTHROUGH;
23318 : case 1:
23319 384 : if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_dim)) != 0)) {
23320 384 : (void)__Pyx_Arg_NewRef_VARARGS(values[1]);
23321 384 : kw_args--;
23322 : }
23323 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 244, __pyx_L3_error)
23324 : else {
23325 0 : __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_initialize_v", 1, 3, 3, 1); __PYX_ERR(0, 244, __pyx_L3_error)
23326 : }
23327 384 : CYTHON_FALLTHROUGH;
23328 : case 2:
23329 384 : if (likely((values[2] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_bits)) != 0)) {
23330 384 : (void)__Pyx_Arg_NewRef_VARARGS(values[2]);
23331 384 : kw_args--;
23332 : }
23333 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 244, __pyx_L3_error)
23334 : else {
23335 0 : __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_initialize_v", 1, 3, 3, 2); __PYX_ERR(0, 244, __pyx_L3_error)
23336 : }
23337 : }
23338 384 : if (unlikely(kw_args > 0)) {
23339 0 : const Py_ssize_t kwd_pos_args = __pyx_nargs;
23340 0 : if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_0_initialize_v") < 0)) __PYX_ERR(0, 244, __pyx_L3_error)
23341 : }
23342 0 : } else if (unlikely(__pyx_nargs != 3)) {
23343 0 : goto __pyx_L5_argtuple_error;
23344 : } else {
23345 0 : values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
23346 0 : values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
23347 0 : values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
23348 : }
23349 384 : __pyx_v_v = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_5numpy_uint32_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_v.memview)) __PYX_ERR(0, 245, __pyx_L3_error)
23350 384 : __pyx_v_dim = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_dim == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 245, __pyx_L3_error)
23351 384 : __pyx_v_bits = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_bits == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 245, __pyx_L3_error)
23352 : }
23353 384 : goto __pyx_L6_skip;
23354 0 : __pyx_L5_argtuple_error:;
23355 0 : __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_initialize_v", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 244, __pyx_L3_error)
23356 384 : __pyx_L6_skip:;
23357 384 : goto __pyx_L4_argument_unpacking_done;
23358 0 : __pyx_L3_error:;
23359 : {
23360 0 : Py_ssize_t __pyx_temp;
23361 0 : for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
23362 : __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
23363 : }
23364 : }
23365 0 : __PYX_XCLEAR_MEMVIEW(&__pyx_v_v, 1);
23366 0 : __Pyx_AddTraceback("scipy.stats._sobol.__pyx_fuse_0_initialize_v", __pyx_clineno, __pyx_lineno, __pyx_filename);
23367 0 : __Pyx_RefNannyFinishContext();
23368 0 : return NULL;
23369 384 : __pyx_L4_argument_unpacking_done:;
23370 384 : __pyx_r = __pyx_pf_5scipy_5stats_6_sobol_18__pyx_fuse_0_initialize_v(__pyx_self, __pyx_v_v, __pyx_v_dim, __pyx_v_bits);
23371 :
23372 : /* function exit code */
23373 384 : __PYX_XCLEAR_MEMVIEW(&__pyx_v_v, 1);
23374 : {
23375 384 : Py_ssize_t __pyx_temp;
23376 384 : for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
23377 : __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
23378 : }
23379 : }
23380 : __Pyx_RefNannyFinishContext();
23381 : return __pyx_r;
23382 : }
23383 :
23384 384 : static PyObject *__pyx_pf_5scipy_5stats_6_sobol_18__pyx_fuse_0_initialize_v(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_v, int __pyx_v_dim, int __pyx_v_bits) {
23385 384 : PyObject *__pyx_r = NULL;
23386 : __Pyx_RefNannyDeclarations
23387 384 : PyObject *__pyx_t_1 = NULL;
23388 384 : int __pyx_lineno = 0;
23389 384 : const char *__pyx_filename = NULL;
23390 384 : int __pyx_clineno = 0;
23391 384 : __Pyx_RefNannySetupContext("__pyx_fuse_0_initialize_v", 1);
23392 384 : __Pyx_XDECREF(__pyx_r);
23393 384 : if (unlikely(!__pyx_v_v.memview)) { __Pyx_RaiseUnboundLocalError("v"); __PYX_ERR(0, 244, __pyx_L1_error) }
23394 384 : __pyx_t_1 = __Pyx_void_to_None(__pyx_fuse_0__pyx_f_5scipy_5stats_6_sobol__initialize_v(__pyx_v_v, __pyx_v_dim, __pyx_v_bits, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 244, __pyx_L1_error)
23395 384 : __Pyx_GOTREF(__pyx_t_1);
23396 384 : __pyx_r = __pyx_t_1;
23397 384 : __pyx_t_1 = 0;
23398 384 : goto __pyx_L0;
23399 :
23400 : /* function exit code */
23401 0 : __pyx_L1_error:;
23402 0 : __Pyx_XDECREF(__pyx_t_1);
23403 0 : __Pyx_AddTraceback("scipy.stats._sobol.__pyx_fuse_0_initialize_v", __pyx_clineno, __pyx_lineno, __pyx_filename);
23404 0 : __pyx_r = NULL;
23405 384 : __pyx_L0:;
23406 384 : __Pyx_XGIVEREF(__pyx_r);
23407 384 : __Pyx_RefNannyFinishContext();
23408 384 : return __pyx_r;
23409 : }
23410 :
23411 : static PyObject *__pyx_pw_5scipy_5stats_6_sobol_21__pyx_fuse_1_initialize_v(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
23412 : static PyObject *__pyx_pw_5scipy_5stats_6_sobol_5_initialize_v(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
23413 10 : static void __pyx_fuse_1__pyx_f_5scipy_5stats_6_sobol__initialize_v(__Pyx_memviewslice __pyx_v_v, int const __pyx_v_dim, int const __pyx_v_bits, CYTHON_UNUSED int __pyx_skip_dispatch) {
23414 10 : int __pyx_v_d;
23415 10 : int __pyx_v_i;
23416 10 : int __pyx_v_j;
23417 10 : int __pyx_v_k;
23418 10 : int __pyx_v_m;
23419 10 : __pyx_t_5numpy_uint64_t __pyx_v_p;
23420 10 : __pyx_t_5numpy_uint64_t __pyx_v_newv;
23421 10 : __pyx_t_5numpy_uint64_t __pyx_v_pow2;
23422 10 : __Pyx_memviewslice __pyx_v_poly = { 0, 0, { 0 }, { 0 }, { 0 } };
23423 10 : __Pyx_memviewslice __pyx_v_vinit = { 0, 0, { 0 }, { 0 }, { 0 } };
23424 : __Pyx_RefNannyDeclarations
23425 10 : PyObject *__pyx_t_1 = NULL;
23426 10 : PyObject *__pyx_t_2 = NULL;
23427 10 : PyObject *__pyx_t_3 = NULL;
23428 10 : PyObject *__pyx_t_4 = NULL;
23429 10 : PyObject *__pyx_t_5 = NULL;
23430 10 : unsigned int __pyx_t_6;
23431 10 : __Pyx_memviewslice __pyx_t_7 = { 0, 0, { 0 }, { 0 }, { 0 } };
23432 10 : __Pyx_memviewslice __pyx_t_8 = { 0, 0, { 0 }, { 0 }, { 0 } };
23433 10 : int __pyx_t_9;
23434 10 : int __pyx_t_10;
23435 10 : int __pyx_t_11;
23436 10 : int __pyx_t_12;
23437 10 : Py_ssize_t __pyx_t_13;
23438 10 : Py_ssize_t __pyx_t_14;
23439 10 : __Pyx_memviewslice __pyx_t_15 = { 0, 0, { 0 }, { 0 }, { 0 } };
23440 10 : int __pyx_t_16;
23441 10 : __Pyx_memviewslice __pyx_t_17 = { 0, 0, { 0 }, { 0 }, { 0 } };
23442 10 : int __pyx_t_18;
23443 10 : int __pyx_t_19;
23444 10 : int __pyx_t_20;
23445 10 : int __pyx_t_21;
23446 10 : int __pyx_t_22;
23447 10 : int __pyx_lineno = 0;
23448 10 : const char *__pyx_filename = NULL;
23449 10 : int __pyx_clineno = 0;
23450 10 : __Pyx_RefNannySetupContext("__pyx_fuse_1_initialize_v", 1);
23451 :
23452 : /* "scipy/stats/_sobol.pyx":250
23453 : * cdef int d, i, j, k, m
23454 : * cdef uint_32_64 p, newv, pow2
23455 : * cdef uint_32_64[:] poly = get_poly_vinit( # <<<<<<<<<<<<<<
23456 : * 'poly',
23457 : * np.uint32 if uint_32_64 is cnp.uint32_t else np.uint64
23458 : */
23459 10 : __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_get_poly_vinit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 250, __pyx_L1_error)
23460 10 : __Pyx_GOTREF(__pyx_t_2);
23461 :
23462 : /* "scipy/stats/_sobol.pyx":252
23463 : * cdef uint_32_64[:] poly = get_poly_vinit(
23464 : * 'poly',
23465 : * np.uint32 if uint_32_64 is cnp.uint32_t else np.uint64 # <<<<<<<<<<<<<<
23466 : * )
23467 : * cdef uint_32_64[:, ::1] vinit = get_poly_vinit(
23468 : */
23469 10 : if (0) {
23470 : __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 252, __pyx_L1_error)
23471 : __Pyx_GOTREF(__pyx_t_4);
23472 : __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_uint32); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 252, __pyx_L1_error)
23473 : __Pyx_GOTREF(__pyx_t_5);
23474 : __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
23475 : __pyx_t_3 = __pyx_t_5;
23476 : __pyx_t_5 = 0;
23477 : } else {
23478 10 : __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 252, __pyx_L1_error)
23479 10 : __Pyx_GOTREF(__pyx_t_5);
23480 10 : __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_uint64); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 252, __pyx_L1_error)
23481 10 : __Pyx_GOTREF(__pyx_t_4);
23482 10 : __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
23483 10 : __pyx_t_3 = __pyx_t_4;
23484 10 : __pyx_t_4 = 0;
23485 : }
23486 10 : __pyx_t_4 = NULL;
23487 10 : __pyx_t_6 = 0;
23488 : #if CYTHON_UNPACK_METHODS
23489 10 : if (unlikely(PyMethod_Check(__pyx_t_2))) {
23490 0 : __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
23491 0 : if (likely(__pyx_t_4)) {
23492 0 : PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
23493 0 : __Pyx_INCREF(__pyx_t_4);
23494 0 : __Pyx_INCREF(function);
23495 0 : __Pyx_DECREF_SET(__pyx_t_2, function);
23496 : __pyx_t_6 = 1;
23497 : }
23498 : }
23499 : #endif
23500 : {
23501 10 : PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_n_u_poly, __pyx_t_3};
23502 10 : __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6);
23503 10 : __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
23504 10 : __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23505 10 : if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 250, __pyx_L1_error)
23506 10 : __Pyx_GOTREF(__pyx_t_1);
23507 10 : __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23508 : }
23509 :
23510 : /* "scipy/stats/_sobol.pyx":250
23511 : * cdef int d, i, j, k, m
23512 : * cdef uint_32_64 p, newv, pow2
23513 : * cdef uint_32_64[:] poly = get_poly_vinit( # <<<<<<<<<<<<<<
23514 : * 'poly',
23515 : * np.uint32 if uint_32_64 is cnp.uint32_t else np.uint64
23516 : */
23517 10 : __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint64_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 250, __pyx_L1_error)
23518 10 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23519 10 : __pyx_v_poly = __pyx_t_7;
23520 10 : __pyx_t_7.memview = NULL;
23521 10 : __pyx_t_7.data = NULL;
23522 :
23523 : /* "scipy/stats/_sobol.pyx":254
23524 : * np.uint32 if uint_32_64 is cnp.uint32_t else np.uint64
23525 : * )
23526 : * cdef uint_32_64[:, ::1] vinit = get_poly_vinit( # <<<<<<<<<<<<<<
23527 : * 'vinit',
23528 : * np.uint32 if uint_32_64 is cnp.uint32_t else np.uint64
23529 : */
23530 10 : __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_get_poly_vinit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 254, __pyx_L1_error)
23531 10 : __Pyx_GOTREF(__pyx_t_2);
23532 :
23533 : /* "scipy/stats/_sobol.pyx":256
23534 : * cdef uint_32_64[:, ::1] vinit = get_poly_vinit(
23535 : * 'vinit',
23536 : * np.uint32 if uint_32_64 is cnp.uint32_t else np.uint64 # <<<<<<<<<<<<<<
23537 : * )
23538 : *
23539 : */
23540 10 : if (0) {
23541 : __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 256, __pyx_L1_error)
23542 : __Pyx_GOTREF(__pyx_t_4);
23543 : __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_uint32); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 256, __pyx_L1_error)
23544 : __Pyx_GOTREF(__pyx_t_5);
23545 : __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
23546 : __pyx_t_3 = __pyx_t_5;
23547 : __pyx_t_5 = 0;
23548 : } else {
23549 10 : __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 256, __pyx_L1_error)
23550 10 : __Pyx_GOTREF(__pyx_t_5);
23551 10 : __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_uint64); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 256, __pyx_L1_error)
23552 10 : __Pyx_GOTREF(__pyx_t_4);
23553 10 : __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
23554 10 : __pyx_t_3 = __pyx_t_4;
23555 10 : __pyx_t_4 = 0;
23556 : }
23557 10 : __pyx_t_4 = NULL;
23558 10 : __pyx_t_6 = 0;
23559 : #if CYTHON_UNPACK_METHODS
23560 10 : if (unlikely(PyMethod_Check(__pyx_t_2))) {
23561 0 : __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
23562 0 : if (likely(__pyx_t_4)) {
23563 0 : PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
23564 0 : __Pyx_INCREF(__pyx_t_4);
23565 0 : __Pyx_INCREF(function);
23566 0 : __Pyx_DECREF_SET(__pyx_t_2, function);
23567 : __pyx_t_6 = 1;
23568 : }
23569 : }
23570 : #endif
23571 : {
23572 10 : PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_n_u_vinit, __pyx_t_3};
23573 10 : __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6);
23574 10 : __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
23575 10 : __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23576 10 : if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 254, __pyx_L1_error)
23577 10 : __Pyx_GOTREF(__pyx_t_1);
23578 10 : __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23579 : }
23580 :
23581 : /* "scipy/stats/_sobol.pyx":254
23582 : * np.uint32 if uint_32_64 is cnp.uint32_t else np.uint64
23583 : * )
23584 : * cdef uint_32_64[:, ::1] vinit = get_poly_vinit( # <<<<<<<<<<<<<<
23585 : * 'vinit',
23586 : * np.uint32 if uint_32_64 is cnp.uint32_t else np.uint64
23587 : */
23588 10 : __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_5numpy_uint64_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 254, __pyx_L1_error)
23589 10 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23590 10 : __pyx_v_vinit = __pyx_t_8;
23591 10 : __pyx_t_8.memview = NULL;
23592 10 : __pyx_t_8.data = NULL;
23593 :
23594 : /* "scipy/stats/_sobol.pyx":259
23595 : * )
23596 : *
23597 : * if dim == 0: # <<<<<<<<<<<<<<
23598 : * return
23599 : *
23600 : */
23601 10 : __pyx_t_9 = (__pyx_v_dim == 0);
23602 10 : if (__pyx_t_9) {
23603 :
23604 : /* "scipy/stats/_sobol.pyx":260
23605 : *
23606 : * if dim == 0:
23607 : * return # <<<<<<<<<<<<<<
23608 : *
23609 : * # first row of v is all 1s
23610 : */
23611 0 : goto __pyx_L0;
23612 :
23613 : /* "scipy/stats/_sobol.pyx":259
23614 : * )
23615 : *
23616 : * if dim == 0: # <<<<<<<<<<<<<<
23617 : * return
23618 : *
23619 : */
23620 : }
23621 :
23622 : /* "scipy/stats/_sobol.pyx":263
23623 : *
23624 : * # first row of v is all 1s
23625 : * for i in range(bits): # <<<<<<<<<<<<<<
23626 : * v[0, i] = 1
23627 : *
23628 : */
23629 : __pyx_t_10 = __pyx_v_bits;
23630 : __pyx_t_11 = __pyx_t_10;
23631 650 : for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
23632 640 : __pyx_v_i = __pyx_t_12;
23633 :
23634 : /* "scipy/stats/_sobol.pyx":264
23635 : * # first row of v is all 1s
23636 : * for i in range(bits):
23637 : * v[0, i] = 1 # <<<<<<<<<<<<<<
23638 : *
23639 : * # Remaining rows of v (row 2 through dim, indexed by [1:dim])
23640 : */
23641 640 : __pyx_t_13 = 0;
23642 640 : __pyx_t_14 = __pyx_v_i;
23643 640 : *((__pyx_t_5numpy_uint64_t *) ( /* dim=1 */ ((char *) (((__pyx_t_5numpy_uint64_t *) ( /* dim=0 */ (__pyx_v_v.data + __pyx_t_13 * __pyx_v_v.strides[0]) )) + __pyx_t_14)) )) = 1;
23644 : }
23645 :
23646 : /* "scipy/stats/_sobol.pyx":267
23647 : *
23648 : * # Remaining rows of v (row 2 through dim, indexed by [1:dim])
23649 : * for d in range(1, dim): # <<<<<<<<<<<<<<
23650 : * p = poly[d]
23651 : * m = bit_length(p) - 1
23652 : */
23653 : __pyx_t_10 = __pyx_v_dim;
23654 : __pyx_t_11 = __pyx_t_10;
23655 56 : for (__pyx_t_12 = 1; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
23656 46 : __pyx_v_d = __pyx_t_12;
23657 :
23658 : /* "scipy/stats/_sobol.pyx":268
23659 : * # Remaining rows of v (row 2 through dim, indexed by [1:dim])
23660 : * for d in range(1, dim):
23661 : * p = poly[d] # <<<<<<<<<<<<<<
23662 : * m = bit_length(p) - 1
23663 : *
23664 : */
23665 46 : __pyx_t_14 = __pyx_v_d;
23666 46 : __pyx_v_p = (*((__pyx_t_5numpy_uint64_t *) ( /* dim=0 */ (__pyx_v_poly.data + __pyx_t_14 * __pyx_v_poly.strides[0]) )));
23667 :
23668 : /* "scipy/stats/_sobol.pyx":269
23669 : * for d in range(1, dim):
23670 : * p = poly[d]
23671 : * m = bit_length(p) - 1 # <<<<<<<<<<<<<<
23672 : *
23673 : * # First m elements of row d comes from vinit
23674 : */
23675 46 : __pyx_v_m = (__pyx_fuse_1__pyx_f_5scipy_5stats_6_sobol_bit_length(__pyx_v_p) - 1);
23676 :
23677 : /* "scipy/stats/_sobol.pyx":272
23678 : *
23679 : * # First m elements of row d comes from vinit
23680 : * v[d, :m] = vinit[d, :m] # <<<<<<<<<<<<<<
23681 : *
23682 : * # Fill in remaining elements of v as in Section 2 (top of pg. 90) of:
23683 : */
23684 46 : __pyx_t_15.data = __pyx_v_vinit.data;
23685 46 : __pyx_t_15.memview = __pyx_v_vinit.memview;
23686 46 : __PYX_INC_MEMVIEW(&__pyx_t_15, 1);
23687 : {
23688 46 : Py_ssize_t __pyx_tmp_idx = __pyx_v_d;
23689 46 : Py_ssize_t __pyx_tmp_stride = __pyx_v_vinit.strides[0];
23690 46 : __pyx_t_15.data += __pyx_tmp_idx * __pyx_tmp_stride;
23691 : }
23692 :
23693 46 : __pyx_t_16 = -1;
23694 46 : if (unlikely(__pyx_memoryview_slice_memviewslice(
23695 : &__pyx_t_15,
23696 : __pyx_v_vinit.shape[1], __pyx_v_vinit.strides[1], __pyx_v_vinit.suboffsets[1],
23697 : 1,
23698 : 0,
23699 : &__pyx_t_16,
23700 : 0,
23701 : __pyx_v_m,
23702 : 0,
23703 : 0,
23704 : 1,
23705 : 0,
23706 : 1) < 0))
23707 : {
23708 0 : __PYX_ERR(0, 272, __pyx_L1_error)
23709 : }
23710 :
23711 46 : __pyx_t_17.data = __pyx_v_v.data;
23712 46 : __pyx_t_17.memview = __pyx_v_v.memview;
23713 46 : __PYX_INC_MEMVIEW(&__pyx_t_17, 1);
23714 : {
23715 46 : Py_ssize_t __pyx_tmp_idx = __pyx_v_d;
23716 46 : Py_ssize_t __pyx_tmp_stride = __pyx_v_v.strides[0];
23717 46 : __pyx_t_17.data += __pyx_tmp_idx * __pyx_tmp_stride;
23718 : }
23719 :
23720 46 : __pyx_t_16 = -1;
23721 46 : if (unlikely(__pyx_memoryview_slice_memviewslice(
23722 : &__pyx_t_17,
23723 : __pyx_v_v.shape[1], __pyx_v_v.strides[1], __pyx_v_v.suboffsets[1],
23724 : 1,
23725 : 0,
23726 : &__pyx_t_16,
23727 : 0,
23728 : __pyx_v_m,
23729 : 0,
23730 : 0,
23731 : 1,
23732 : 0,
23733 : 1) < 0))
23734 : {
23735 0 : __PYX_ERR(0, 272, __pyx_L1_error)
23736 : }
23737 :
23738 46 : if (unlikely((__pyx_memoryview_copy_contents(__pyx_t_15, __pyx_t_17, 1, 1, 0) < 0))) __PYX_ERR(0, 272, __pyx_L1_error)
23739 46 : __PYX_XCLEAR_MEMVIEW(&__pyx_t_17, 1);
23740 46 : __pyx_t_17.memview = NULL; __pyx_t_17.data = NULL;
23741 46 : __PYX_XCLEAR_MEMVIEW(&__pyx_t_15, 1);
23742 46 : __pyx_t_15.memview = NULL; __pyx_t_15.data = NULL;
23743 :
23744 : /* "scipy/stats/_sobol.pyx":280
23745 : * # Math. Softw., 14(1):88-100, Mar. 1988.
23746 : * #
23747 : * for j in range(m, bits): # <<<<<<<<<<<<<<
23748 : * newv = v[d, j - m]
23749 : * pow2 = 1
23750 : */
23751 46 : __pyx_t_16 = __pyx_v_bits;
23752 46 : __pyx_t_18 = __pyx_t_16;
23753 2856 : for (__pyx_t_19 = __pyx_v_m; __pyx_t_19 < __pyx_t_18; __pyx_t_19+=1) {
23754 2810 : __pyx_v_j = __pyx_t_19;
23755 :
23756 : /* "scipy/stats/_sobol.pyx":281
23757 : * #
23758 : * for j in range(m, bits):
23759 : * newv = v[d, j - m] # <<<<<<<<<<<<<<
23760 : * pow2 = 1
23761 : * for k in range(m):
23762 : */
23763 2810 : __pyx_t_14 = __pyx_v_d;
23764 2810 : __pyx_t_13 = (__pyx_v_j - __pyx_v_m);
23765 2810 : __pyx_v_newv = (*((__pyx_t_5numpy_uint64_t *) ( /* dim=1 */ ((char *) (((__pyx_t_5numpy_uint64_t *) ( /* dim=0 */ (__pyx_v_v.data + __pyx_t_14 * __pyx_v_v.strides[0]) )) + __pyx_t_13)) )));
23766 :
23767 : /* "scipy/stats/_sobol.pyx":282
23768 : * for j in range(m, bits):
23769 : * newv = v[d, j - m]
23770 : * pow2 = 1 # <<<<<<<<<<<<<<
23771 : * for k in range(m):
23772 : * pow2 = pow2 << 1
23773 : */
23774 2810 : __pyx_v_pow2 = 1;
23775 :
23776 : /* "scipy/stats/_sobol.pyx":283
23777 : * newv = v[d, j - m]
23778 : * pow2 = 1
23779 : * for k in range(m): # <<<<<<<<<<<<<<
23780 : * pow2 = pow2 << 1
23781 : * if (p >> (m - 1 - k)) & 1:
23782 : */
23783 2810 : __pyx_t_20 = __pyx_v_m;
23784 2810 : __pyx_t_21 = __pyx_t_20;
23785 10908 : for (__pyx_t_22 = 0; __pyx_t_22 < __pyx_t_21; __pyx_t_22+=1) {
23786 8098 : __pyx_v_k = __pyx_t_22;
23787 :
23788 : /* "scipy/stats/_sobol.pyx":284
23789 : * pow2 = 1
23790 : * for k in range(m):
23791 : * pow2 = pow2 << 1 # <<<<<<<<<<<<<<
23792 : * if (p >> (m - 1 - k)) & 1:
23793 : * newv = newv ^ (pow2 * v[d, j - k - 1])
23794 : */
23795 8098 : __pyx_v_pow2 = (__pyx_v_pow2 << 1);
23796 :
23797 : /* "scipy/stats/_sobol.pyx":285
23798 : * for k in range(m):
23799 : * pow2 = pow2 << 1
23800 : * if (p >> (m - 1 - k)) & 1: # <<<<<<<<<<<<<<
23801 : * newv = newv ^ (pow2 * v[d, j - k - 1])
23802 : * v[d, j] = newv
23803 : */
23804 8098 : __pyx_t_9 = (((__pyx_v_p >> ((__pyx_v_m - 1) - __pyx_v_k)) & 1) != 0);
23805 8098 : if (__pyx_t_9) {
23806 :
23807 : /* "scipy/stats/_sobol.pyx":286
23808 : * pow2 = pow2 << 1
23809 : * if (p >> (m - 1 - k)) & 1:
23810 : * newv = newv ^ (pow2 * v[d, j - k - 1]) # <<<<<<<<<<<<<<
23811 : * v[d, j] = newv
23812 : *
23813 : */
23814 5462 : __pyx_t_13 = __pyx_v_d;
23815 5462 : __pyx_t_14 = ((__pyx_v_j - __pyx_v_k) - 1);
23816 5462 : __pyx_v_newv = (__pyx_v_newv ^ (__pyx_v_pow2 * (*((__pyx_t_5numpy_uint64_t *) ( /* dim=1 */ ((char *) (((__pyx_t_5numpy_uint64_t *) ( /* dim=0 */ (__pyx_v_v.data + __pyx_t_13 * __pyx_v_v.strides[0]) )) + __pyx_t_14)) )))));
23817 :
23818 : /* "scipy/stats/_sobol.pyx":285
23819 : * for k in range(m):
23820 : * pow2 = pow2 << 1
23821 : * if (p >> (m - 1 - k)) & 1: # <<<<<<<<<<<<<<
23822 : * newv = newv ^ (pow2 * v[d, j - k - 1])
23823 : * v[d, j] = newv
23824 : */
23825 : }
23826 : }
23827 :
23828 : /* "scipy/stats/_sobol.pyx":287
23829 : * if (p >> (m - 1 - k)) & 1:
23830 : * newv = newv ^ (pow2 * v[d, j - k - 1])
23831 : * v[d, j] = newv # <<<<<<<<<<<<<<
23832 : *
23833 : * # Multiply each column of v by power of 2:
23834 : */
23835 2810 : __pyx_t_14 = __pyx_v_d;
23836 2810 : __pyx_t_13 = __pyx_v_j;
23837 2810 : *((__pyx_t_5numpy_uint64_t *) ( /* dim=1 */ ((char *) (((__pyx_t_5numpy_uint64_t *) ( /* dim=0 */ (__pyx_v_v.data + __pyx_t_14 * __pyx_v_v.strides[0]) )) + __pyx_t_13)) )) = __pyx_v_newv;
23838 : }
23839 : }
23840 :
23841 : /* "scipy/stats/_sobol.pyx":291
23842 : * # Multiply each column of v by power of 2:
23843 : * # v * [2^(bits-1), 2^(bits-2),..., 2, 1]
23844 : * pow2 = 1 # <<<<<<<<<<<<<<
23845 : * for d in range(bits):
23846 : * for i in range(dim):
23847 : */
23848 : __pyx_v_pow2 = 1;
23849 :
23850 : /* "scipy/stats/_sobol.pyx":292
23851 : * # v * [2^(bits-1), 2^(bits-2),..., 2, 1]
23852 : * pow2 = 1
23853 : * for d in range(bits): # <<<<<<<<<<<<<<
23854 : * for i in range(dim):
23855 : * v[i, bits - 1 - d] *= pow2
23856 : */
23857 : __pyx_t_10 = __pyx_v_bits;
23858 : __pyx_t_11 = __pyx_t_10;
23859 650 : for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
23860 4224 : __pyx_v_d = __pyx_t_12;
23861 :
23862 : /* "scipy/stats/_sobol.pyx":293
23863 : * pow2 = 1
23864 : * for d in range(bits):
23865 : * for i in range(dim): # <<<<<<<<<<<<<<
23866 : * v[i, bits - 1 - d] *= pow2
23867 : * pow2 = pow2 << 1
23868 : */
23869 : __pyx_t_16 = __pyx_v_dim;
23870 4224 : __pyx_t_18 = __pyx_t_16;
23871 4224 : for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_18; __pyx_t_19+=1) {
23872 3584 : __pyx_v_i = __pyx_t_19;
23873 :
23874 : /* "scipy/stats/_sobol.pyx":294
23875 : * for d in range(bits):
23876 : * for i in range(dim):
23877 : * v[i, bits - 1 - d] *= pow2 # <<<<<<<<<<<<<<
23878 : * pow2 = pow2 << 1
23879 : *
23880 : */
23881 3584 : __pyx_t_13 = __pyx_v_i;
23882 3584 : __pyx_t_14 = ((__pyx_v_bits - 1) - __pyx_v_d);
23883 3584 : *((__pyx_t_5numpy_uint64_t *) ( /* dim=1 */ ((char *) (((__pyx_t_5numpy_uint64_t *) ( /* dim=0 */ (__pyx_v_v.data + __pyx_t_13 * __pyx_v_v.strides[0]) )) + __pyx_t_14)) )) *= __pyx_v_pow2;
23884 : }
23885 :
23886 : /* "scipy/stats/_sobol.pyx":295
23887 : * for i in range(dim):
23888 : * v[i, bits - 1 - d] *= pow2
23889 : * pow2 = pow2 << 1 # <<<<<<<<<<<<<<
23890 : *
23891 : *
23892 : */
23893 640 : __pyx_v_pow2 = (__pyx_v_pow2 << 1);
23894 : }
23895 :
23896 : /* "scipy/stats/_sobol.pyx":244
23897 : * @cython.boundscheck(False)
23898 : * @cython.wraparound(False)
23899 : * cpdef void _initialize_v( # <<<<<<<<<<<<<<
23900 : * uint_32_64[:, ::1] v, const int dim, const int bits
23901 : * ) noexcept:
23902 : */
23903 :
23904 : /* function exit code */
23905 10 : goto __pyx_L0;
23906 0 : __pyx_L1_error:;
23907 0 : __Pyx_XDECREF(__pyx_t_1);
23908 0 : __Pyx_XDECREF(__pyx_t_2);
23909 0 : __Pyx_XDECREF(__pyx_t_3);
23910 0 : __Pyx_XDECREF(__pyx_t_4);
23911 0 : __Pyx_XDECREF(__pyx_t_5);
23912 0 : __PYX_XCLEAR_MEMVIEW(&__pyx_t_7, 1);
23913 0 : __PYX_XCLEAR_MEMVIEW(&__pyx_t_8, 1);
23914 0 : __PYX_XCLEAR_MEMVIEW(&__pyx_t_15, 1);
23915 0 : __PYX_XCLEAR_MEMVIEW(&__pyx_t_17, 1);
23916 0 : __Pyx_WriteUnraisable("scipy.stats._sobol._initialize_v", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
23917 10 : __pyx_L0:;
23918 10 : __PYX_XCLEAR_MEMVIEW(&__pyx_v_poly, 1);
23919 10 : __PYX_XCLEAR_MEMVIEW(&__pyx_v_vinit, 1);
23920 10 : __Pyx_RefNannyFinishContext();
23921 10 : }
23922 :
23923 : /* Python wrapper */
23924 : static PyObject *__pyx_pw_5scipy_5stats_6_sobol_21__pyx_fuse_1_initialize_v(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
23925 : static PyMethodDef __pyx_fuse_1__pyx_mdef_5scipy_5stats_6_sobol_21__pyx_fuse_1_initialize_v = {"__pyx_fuse_1_initialize_v", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5scipy_5stats_6_sobol_21__pyx_fuse_1_initialize_v, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5scipy_5stats_6_sobol_4_initialize_v};
23926 10 : static PyObject *__pyx_pw_5scipy_5stats_6_sobol_21__pyx_fuse_1_initialize_v(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
23927 10 : __Pyx_memviewslice __pyx_v_v = { 0, 0, { 0 }, { 0 }, { 0 } };
23928 10 : int __pyx_v_dim;
23929 10 : int __pyx_v_bits;
23930 10 : CYTHON_UNUSED Py_ssize_t __pyx_nargs;
23931 10 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
23932 10 : PyObject* values[3] = {0,0,0};
23933 10 : int __pyx_lineno = 0;
23934 10 : const char *__pyx_filename = NULL;
23935 10 : int __pyx_clineno = 0;
23936 10 : PyObject *__pyx_r = 0;
23937 : __Pyx_RefNannyDeclarations
23938 10 : __Pyx_RefNannySetupContext("__pyx_fuse_1_initialize_v (wrapper)", 0);
23939 : #if CYTHON_ASSUME_SAFE_MACROS
23940 10 : __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
23941 : #else
23942 : __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
23943 : #endif
23944 10 : __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
23945 : {
23946 10 : PyObject **__pyx_pyargnames[] = {&__pyx_n_s_v,&__pyx_n_s_dim,&__pyx_n_s_bits,0};
23947 10 : if (__pyx_kwds) {
23948 10 : Py_ssize_t kw_args;
23949 10 : switch (__pyx_nargs) {
23950 0 : case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
23951 0 : CYTHON_FALLTHROUGH;
23952 0 : case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
23953 10 : CYTHON_FALLTHROUGH;
23954 10 : case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
23955 10 : CYTHON_FALLTHROUGH;
23956 10 : case 0: break;
23957 0 : default: goto __pyx_L5_argtuple_error;
23958 : }
23959 10 : kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
23960 10 : switch (__pyx_nargs) {
23961 0 : case 0:
23962 0 : if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_v)) != 0)) {
23963 0 : (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
23964 0 : kw_args--;
23965 : }
23966 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 244, __pyx_L3_error)
23967 0 : else goto __pyx_L5_argtuple_error;
23968 10 : CYTHON_FALLTHROUGH;
23969 : case 1:
23970 10 : if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_dim)) != 0)) {
23971 10 : (void)__Pyx_Arg_NewRef_VARARGS(values[1]);
23972 10 : kw_args--;
23973 : }
23974 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 244, __pyx_L3_error)
23975 : else {
23976 0 : __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_initialize_v", 1, 3, 3, 1); __PYX_ERR(0, 244, __pyx_L3_error)
23977 : }
23978 10 : CYTHON_FALLTHROUGH;
23979 : case 2:
23980 10 : if (likely((values[2] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_bits)) != 0)) {
23981 10 : (void)__Pyx_Arg_NewRef_VARARGS(values[2]);
23982 10 : kw_args--;
23983 : }
23984 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 244, __pyx_L3_error)
23985 : else {
23986 0 : __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_initialize_v", 1, 3, 3, 2); __PYX_ERR(0, 244, __pyx_L3_error)
23987 : }
23988 : }
23989 10 : if (unlikely(kw_args > 0)) {
23990 0 : const Py_ssize_t kwd_pos_args = __pyx_nargs;
23991 0 : if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_1_initialize_v") < 0)) __PYX_ERR(0, 244, __pyx_L3_error)
23992 : }
23993 0 : } else if (unlikely(__pyx_nargs != 3)) {
23994 0 : goto __pyx_L5_argtuple_error;
23995 : } else {
23996 0 : values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
23997 0 : values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
23998 0 : values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
23999 : }
24000 10 : __pyx_v_v = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_5numpy_uint64_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_v.memview)) __PYX_ERR(0, 245, __pyx_L3_error)
24001 10 : __pyx_v_dim = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_dim == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 245, __pyx_L3_error)
24002 10 : __pyx_v_bits = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_bits == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 245, __pyx_L3_error)
24003 : }
24004 10 : goto __pyx_L6_skip;
24005 0 : __pyx_L5_argtuple_error:;
24006 0 : __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_initialize_v", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 244, __pyx_L3_error)
24007 10 : __pyx_L6_skip:;
24008 10 : goto __pyx_L4_argument_unpacking_done;
24009 0 : __pyx_L3_error:;
24010 : {
24011 0 : Py_ssize_t __pyx_temp;
24012 0 : for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
24013 : __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
24014 : }
24015 : }
24016 0 : __PYX_XCLEAR_MEMVIEW(&__pyx_v_v, 1);
24017 0 : __Pyx_AddTraceback("scipy.stats._sobol.__pyx_fuse_1_initialize_v", __pyx_clineno, __pyx_lineno, __pyx_filename);
24018 0 : __Pyx_RefNannyFinishContext();
24019 0 : return NULL;
24020 10 : __pyx_L4_argument_unpacking_done:;
24021 10 : __pyx_r = __pyx_pf_5scipy_5stats_6_sobol_20__pyx_fuse_1_initialize_v(__pyx_self, __pyx_v_v, __pyx_v_dim, __pyx_v_bits);
24022 :
24023 : /* function exit code */
24024 10 : __PYX_XCLEAR_MEMVIEW(&__pyx_v_v, 1);
24025 : {
24026 10 : Py_ssize_t __pyx_temp;
24027 10 : for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
24028 : __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
24029 : }
24030 : }
24031 : __Pyx_RefNannyFinishContext();
24032 : return __pyx_r;
24033 : }
24034 :
24035 10 : static PyObject *__pyx_pf_5scipy_5stats_6_sobol_20__pyx_fuse_1_initialize_v(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_v, int __pyx_v_dim, int __pyx_v_bits) {
24036 10 : PyObject *__pyx_r = NULL;
24037 : __Pyx_RefNannyDeclarations
24038 10 : PyObject *__pyx_t_1 = NULL;
24039 10 : int __pyx_lineno = 0;
24040 10 : const char *__pyx_filename = NULL;
24041 10 : int __pyx_clineno = 0;
24042 10 : __Pyx_RefNannySetupContext("__pyx_fuse_1_initialize_v", 1);
24043 10 : __Pyx_XDECREF(__pyx_r);
24044 10 : if (unlikely(!__pyx_v_v.memview)) { __Pyx_RaiseUnboundLocalError("v"); __PYX_ERR(0, 244, __pyx_L1_error) }
24045 10 : __pyx_t_1 = __Pyx_void_to_None(__pyx_fuse_1__pyx_f_5scipy_5stats_6_sobol__initialize_v(__pyx_v_v, __pyx_v_dim, __pyx_v_bits, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 244, __pyx_L1_error)
24046 10 : __Pyx_GOTREF(__pyx_t_1);
24047 10 : __pyx_r = __pyx_t_1;
24048 10 : __pyx_t_1 = 0;
24049 10 : goto __pyx_L0;
24050 :
24051 : /* function exit code */
24052 0 : __pyx_L1_error:;
24053 0 : __Pyx_XDECREF(__pyx_t_1);
24054 0 : __Pyx_AddTraceback("scipy.stats._sobol.__pyx_fuse_1_initialize_v", __pyx_clineno, __pyx_lineno, __pyx_filename);
24055 0 : __pyx_r = NULL;
24056 10 : __pyx_L0:;
24057 10 : __Pyx_XGIVEREF(__pyx_r);
24058 10 : __Pyx_RefNannyFinishContext();
24059 10 : return __pyx_r;
24060 : }
24061 :
24062 : /* "scipy/stats/_sobol.pyx":298
24063 : *
24064 : *
24065 : * def _draw( # <<<<<<<<<<<<<<
24066 : * n,
24067 : * num_gen,
24068 : */
24069 :
24070 : /* Python wrapper */
24071 : static PyObject *__pyx_pw_5scipy_5stats_6_sobol_7_draw(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
24072 : static PyMethodDef __pyx_mdef_5scipy_5stats_6_sobol_7_draw = {"_draw", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5scipy_5stats_6_sobol_7_draw, METH_VARARGS|METH_KEYWORDS, 0};
24073 445 : static PyObject *__pyx_pw_5scipy_5stats_6_sobol_7_draw(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
24074 445 : PyObject *__pyx_v_signatures = 0;
24075 445 : PyObject *__pyx_v_args = 0;
24076 445 : PyObject *__pyx_v_kwargs = 0;
24077 445 : CYTHON_UNUSED PyObject *__pyx_v_defaults = 0;
24078 445 : PyObject *__pyx_v__fused_sigindex = 0;
24079 445 : CYTHON_UNUSED Py_ssize_t __pyx_nargs;
24080 445 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
24081 445 : PyObject* values[5] = {0,0,0,0,0};
24082 445 : int __pyx_lineno = 0;
24083 445 : const char *__pyx_filename = NULL;
24084 445 : int __pyx_clineno = 0;
24085 445 : PyObject *__pyx_r = 0;
24086 : __Pyx_RefNannyDeclarations
24087 445 : __Pyx_RefNannySetupContext("__pyx_fused_cpdef (wrapper)", 0);
24088 : #if CYTHON_ASSUME_SAFE_MACROS
24089 445 : __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
24090 : #else
24091 : __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
24092 : #endif
24093 445 : __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
24094 : {
24095 445 : PyObject **__pyx_pyargnames[] = {&__pyx_n_s_signatures,&__pyx_n_s_args,&__pyx_n_s_kwargs,&__pyx_n_s_defaults,&__pyx_n_s_fused_sigindex,0};
24096 445 : __pyx_defaults1 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self);
24097 445 : values[4] = __Pyx_Arg_NewRef_VARARGS(__pyx_dynamic_args->__pyx_arg__fused_sigindex);
24098 445 : if (__pyx_kwds) {
24099 0 : Py_ssize_t kw_args;
24100 0 : switch (__pyx_nargs) {
24101 0 : case 5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
24102 0 : CYTHON_FALLTHROUGH;
24103 0 : case 4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
24104 0 : CYTHON_FALLTHROUGH;
24105 0 : case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
24106 0 : CYTHON_FALLTHROUGH;
24107 0 : case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
24108 0 : CYTHON_FALLTHROUGH;
24109 0 : case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
24110 0 : CYTHON_FALLTHROUGH;
24111 0 : case 0: break;
24112 0 : default: goto __pyx_L5_argtuple_error;
24113 : }
24114 0 : kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
24115 0 : switch (__pyx_nargs) {
24116 0 : case 0:
24117 0 : if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_signatures)) != 0)) {
24118 0 : (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
24119 0 : kw_args--;
24120 : }
24121 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 298, __pyx_L3_error)
24122 0 : else goto __pyx_L5_argtuple_error;
24123 0 : CYTHON_FALLTHROUGH;
24124 : case 1:
24125 0 : if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_args)) != 0)) {
24126 0 : (void)__Pyx_Arg_NewRef_VARARGS(values[1]);
24127 0 : kw_args--;
24128 : }
24129 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 298, __pyx_L3_error)
24130 : else {
24131 0 : __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 1); __PYX_ERR(0, 298, __pyx_L3_error)
24132 : }
24133 0 : CYTHON_FALLTHROUGH;
24134 : case 2:
24135 0 : if (likely((values[2] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_kwargs)) != 0)) {
24136 0 : (void)__Pyx_Arg_NewRef_VARARGS(values[2]);
24137 0 : kw_args--;
24138 : }
24139 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 298, __pyx_L3_error)
24140 : else {
24141 0 : __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 2); __PYX_ERR(0, 298, __pyx_L3_error)
24142 : }
24143 0 : CYTHON_FALLTHROUGH;
24144 : case 3:
24145 0 : if (likely((values[3] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_defaults)) != 0)) {
24146 0 : (void)__Pyx_Arg_NewRef_VARARGS(values[3]);
24147 0 : kw_args--;
24148 : }
24149 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 298, __pyx_L3_error)
24150 : else {
24151 0 : __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 3); __PYX_ERR(0, 298, __pyx_L3_error)
24152 : }
24153 0 : CYTHON_FALLTHROUGH;
24154 : case 4:
24155 0 : if (kw_args > 0) {
24156 0 : PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fused_sigindex);
24157 0 : if (value) { values[4] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
24158 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 298, __pyx_L3_error)
24159 : }
24160 : }
24161 0 : if (unlikely(kw_args > 0)) {
24162 0 : const Py_ssize_t kwd_pos_args = __pyx_nargs;
24163 0 : if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fused_cpdef") < 0)) __PYX_ERR(0, 298, __pyx_L3_error)
24164 : }
24165 : } else {
24166 445 : switch (__pyx_nargs) {
24167 0 : case 5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
24168 445 : CYTHON_FALLTHROUGH;
24169 445 : case 4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
24170 445 : values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
24171 445 : values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
24172 445 : values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
24173 445 : break;
24174 0 : default: goto __pyx_L5_argtuple_error;
24175 : }
24176 : }
24177 445 : __pyx_v_signatures = values[0];
24178 445 : __pyx_v_args = values[1];
24179 445 : __pyx_v_kwargs = values[2];
24180 445 : __pyx_v_defaults = values[3];
24181 445 : __pyx_v__fused_sigindex = values[4];
24182 : }
24183 445 : goto __pyx_L6_skip;
24184 0 : __pyx_L5_argtuple_error:;
24185 0 : __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 298, __pyx_L3_error)
24186 445 : __pyx_L6_skip:;
24187 445 : goto __pyx_L4_argument_unpacking_done;
24188 0 : __pyx_L3_error:;
24189 : {
24190 0 : Py_ssize_t __pyx_temp;
24191 0 : for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
24192 : __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
24193 : }
24194 : }
24195 0 : __Pyx_AddTraceback("scipy.stats._sobol.__pyx_fused_cpdef", __pyx_clineno, __pyx_lineno, __pyx_filename);
24196 0 : __Pyx_RefNannyFinishContext();
24197 0 : return NULL;
24198 445 : __pyx_L4_argument_unpacking_done:;
24199 445 : __pyx_r = __pyx_pf_5scipy_5stats_6_sobol_6_draw(__pyx_self, __pyx_v_signatures, __pyx_v_args, __pyx_v_kwargs, __pyx_v_defaults, __pyx_v__fused_sigindex);
24200 :
24201 : /* function exit code */
24202 : {
24203 445 : Py_ssize_t __pyx_temp;
24204 445 : for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
24205 : __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
24206 : }
24207 : }
24208 : __Pyx_RefNannyFinishContext();
24209 : return __pyx_r;
24210 : }
24211 :
24212 445 : static PyObject *__pyx_pf_5scipy_5stats_6_sobol_6_draw(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_signatures, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, CYTHON_UNUSED PyObject *__pyx_v_defaults, PyObject *__pyx_v__fused_sigindex) {
24213 445 : PyObject *__pyx_v_search_list = 0;
24214 445 : PyObject *__pyx_v_sigindex_node = 0;
24215 445 : PyObject *__pyx_v_dest_sig = NULL;
24216 445 : PyTypeObject *__pyx_v_ndarray = 0;
24217 445 : PyObject *__pyx_v_arg_as_memoryview = 0;
24218 445 : __Pyx_memviewslice __pyx_v_memslice;
24219 445 : Py_ssize_t __pyx_v_itemsize;
24220 445 : int __pyx_v_dtype_signed;
24221 445 : Py_UCS4 __pyx_v_kind;
24222 445 : int __pyx_v___pyx_fused_dtype_const_uint32__t_is_signed;
24223 445 : int __pyx_v___pyx_fused_dtype_const_uint64__t_is_signed;
24224 445 : PyObject *__pyx_v_arg = NULL;
24225 445 : PyObject *__pyx_v_dtype = NULL;
24226 445 : PyObject *__pyx_v_arg_base = NULL;
24227 445 : PyObject *__pyx_v_sig = NULL;
24228 445 : PyObject *__pyx_v_sig_series = NULL;
24229 445 : PyObject *__pyx_v_last_type = NULL;
24230 445 : PyObject *__pyx_v_sig_type = NULL;
24231 445 : PyObject *__pyx_v_sigindex_matches = NULL;
24232 445 : PyObject *__pyx_v_sigindex_candidates = NULL;
24233 445 : PyObject *__pyx_v_dst_type = NULL;
24234 445 : PyObject *__pyx_v_found_matches = NULL;
24235 445 : PyObject *__pyx_v_found_candidates = NULL;
24236 445 : PyObject *__pyx_v_sn = NULL;
24237 445 : PyObject *__pyx_v_type_match = NULL;
24238 445 : PyObject *__pyx_v_candidates = NULL;
24239 445 : PyObject *__pyx_r = NULL;
24240 : __Pyx_RefNannyDeclarations
24241 445 : PyObject *__pyx_t_1 = NULL;
24242 445 : int __pyx_t_2;
24243 445 : int __pyx_t_3;
24244 445 : int __pyx_t_4;
24245 445 : Py_ssize_t __pyx_t_5;
24246 445 : PyObject *__pyx_t_6 = NULL;
24247 445 : long __pyx_t_7;
24248 445 : PyObject *__pyx_t_8 = NULL;
24249 445 : PyObject *__pyx_t_9 = NULL;
24250 445 : PyObject *__pyx_t_10 = NULL;
24251 445 : int __pyx_t_11;
24252 445 : __Pyx_memviewslice __pyx_t_12;
24253 445 : PyObject *__pyx_t_13 = NULL;
24254 445 : Py_ssize_t __pyx_t_14;
24255 445 : int __pyx_t_15;
24256 445 : PyObject *__pyx_t_16 = NULL;
24257 445 : PyObject *__pyx_t_17 = NULL;
24258 445 : unsigned int __pyx_t_18;
24259 445 : Py_ssize_t __pyx_t_19;
24260 445 : int __pyx_t_20;
24261 445 : int __pyx_lineno = 0;
24262 445 : const char *__pyx_filename = NULL;
24263 445 : int __pyx_clineno = 0;
24264 445 : __Pyx_RefNannySetupContext("_draw", 0);
24265 445 : __Pyx_INCREF(__pyx_v_kwargs);
24266 445 : __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 298, __pyx_L1_error)
24267 445 : __Pyx_GOTREF(__pyx_t_1);
24268 445 : __Pyx_INCREF(Py_None);
24269 445 : __Pyx_GIVEREF(Py_None);
24270 445 : if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, Py_None)) __PYX_ERR(0, 298, __pyx_L1_error);
24271 445 : __pyx_v_dest_sig = ((PyObject*)__pyx_t_1);
24272 445 : __pyx_t_1 = 0;
24273 445 : __pyx_t_3 = (__pyx_v_kwargs != Py_None);
24274 445 : if (__pyx_t_3) {
24275 445 : } else {
24276 0 : __pyx_t_2 = __pyx_t_3;
24277 0 : goto __pyx_L4_bool_binop_done;
24278 : }
24279 445 : __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 298, __pyx_L1_error)
24280 445 : __pyx_t_4 = (!__pyx_t_3);
24281 445 : __pyx_t_2 = __pyx_t_4;
24282 445 : __pyx_L4_bool_binop_done:;
24283 445 : if (__pyx_t_2) {
24284 0 : __Pyx_INCREF(Py_None);
24285 0 : __Pyx_DECREF_SET(__pyx_v_kwargs, Py_None);
24286 : }
24287 445 : __pyx_t_1 = ((PyObject *)__Pyx_ImportNumPyArrayTypeIfAvailable()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 298, __pyx_L1_error)
24288 445 : __Pyx_GOTREF(__pyx_t_1);
24289 445 : __pyx_v_ndarray = ((PyTypeObject*)__pyx_t_1);
24290 445 : __pyx_t_1 = 0;
24291 445 : __pyx_v_itemsize = -1L;
24292 445 : __pyx_v___pyx_fused_dtype_const_uint32__t_is_signed = (!(((__pyx_t_5numpy_uint32_t const )-1L) > 0));
24293 445 : __pyx_v___pyx_fused_dtype_const_uint64__t_is_signed = (!(((__pyx_t_5numpy_uint64_t const )-1L) > 0));
24294 445 : if (unlikely(__pyx_v_args == Py_None)) {
24295 0 : PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
24296 0 : __PYX_ERR(0, 298, __pyx_L1_error)
24297 : }
24298 445 : __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 298, __pyx_L1_error)
24299 445 : __pyx_t_2 = (4 < __pyx_t_5);
24300 445 : if (__pyx_t_2) {
24301 0 : if (unlikely(__pyx_v_args == Py_None)) {
24302 : PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
24303 : __PYX_ERR(0, 298, __pyx_L1_error)
24304 : }
24305 0 : __pyx_t_1 = __Pyx_GetItemInt_Tuple(((PyObject*)__pyx_v_args), 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 298, __pyx_L1_error)
24306 0 : __Pyx_GOTREF(__pyx_t_1);
24307 0 : __pyx_v_arg = __pyx_t_1;
24308 0 : __pyx_t_1 = 0;
24309 0 : goto __pyx_L6;
24310 : }
24311 445 : __pyx_t_4 = (__pyx_v_kwargs != Py_None);
24312 445 : if (__pyx_t_4) {
24313 445 : } else {
24314 0 : __pyx_t_2 = __pyx_t_4;
24315 0 : goto __pyx_L7_bool_binop_done;
24316 : }
24317 445 : if (unlikely(__pyx_v_kwargs == Py_None)) {
24318 : PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
24319 : __PYX_ERR(0, 298, __pyx_L1_error)
24320 : }
24321 890 : __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_sv, ((PyObject*)__pyx_v_kwargs), Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 298, __pyx_L1_error)
24322 : __pyx_t_2 = __pyx_t_4;
24323 445 : __pyx_L7_bool_binop_done:;
24324 445 : if (likely(__pyx_t_2)) {
24325 445 : if (unlikely(__pyx_v_kwargs == Py_None)) {
24326 0 : PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
24327 0 : __PYX_ERR(0, 298, __pyx_L1_error)
24328 : }
24329 445 : __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_kwargs), __pyx_n_s_sv); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 298, __pyx_L1_error)
24330 445 : __Pyx_GOTREF(__pyx_t_1);
24331 445 : __pyx_v_arg = __pyx_t_1;
24332 445 : __pyx_t_1 = 0;
24333 445 : goto __pyx_L6;
24334 : }
24335 : /*else*/ {
24336 0 : if (unlikely(__pyx_v_args == Py_None)) {
24337 : PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
24338 : __PYX_ERR(0, 298, __pyx_L1_error)
24339 : }
24340 0 : __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 298, __pyx_L1_error)
24341 0 : __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 298, __pyx_L1_error)
24342 0 : __Pyx_GOTREF(__pyx_t_1);
24343 0 : __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 298, __pyx_L1_error)
24344 0 : __Pyx_GOTREF(__pyx_t_6);
24345 0 : __Pyx_INCREF(__pyx_int_7);
24346 0 : __Pyx_GIVEREF(__pyx_int_7);
24347 0 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_7)) __PYX_ERR(0, 298, __pyx_L1_error);
24348 0 : __Pyx_INCREF(__pyx_n_s_s);
24349 0 : __Pyx_GIVEREF(__pyx_n_s_s);
24350 0 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_s)) __PYX_ERR(0, 298, __pyx_L1_error);
24351 0 : __Pyx_GIVEREF(__pyx_t_1);
24352 0 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_1)) __PYX_ERR(0, 298, __pyx_L1_error);
24353 0 : __pyx_t_1 = 0;
24354 0 : __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Expected_at_least_d_argument_s_g, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 298, __pyx_L1_error)
24355 0 : __Pyx_GOTREF(__pyx_t_1);
24356 0 : __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
24357 0 : __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 298, __pyx_L1_error)
24358 0 : __Pyx_GOTREF(__pyx_t_6);
24359 0 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24360 0 : __Pyx_Raise(__pyx_t_6, 0, 0, 0);
24361 0 : __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
24362 0 : __PYX_ERR(0, 298, __pyx_L1_error)
24363 : }
24364 445 : __pyx_L6:;
24365 445 : while (1) {
24366 445 : __pyx_t_2 = (__pyx_v_ndarray != ((PyTypeObject*)Py_None));
24367 445 : if (__pyx_t_2) {
24368 445 : __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_arg, __pyx_v_ndarray);
24369 445 : if (__pyx_t_2) {
24370 445 : __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 298, __pyx_L1_error)
24371 445 : __Pyx_GOTREF(__pyx_t_6);
24372 445 : __pyx_v_dtype = __pyx_t_6;
24373 445 : __pyx_t_6 = 0;
24374 445 : goto __pyx_L12;
24375 : }
24376 0 : __pyx_t_2 = __pyx_memoryview_check(__pyx_v_arg);
24377 0 : if (__pyx_t_2) {
24378 0 : __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_base); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 298, __pyx_L1_error)
24379 0 : __Pyx_GOTREF(__pyx_t_6);
24380 0 : __pyx_v_arg_base = __pyx_t_6;
24381 0 : __pyx_t_6 = 0;
24382 0 : __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_arg_base, __pyx_v_ndarray);
24383 0 : if (__pyx_t_2) {
24384 0 : __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg_base, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 298, __pyx_L1_error)
24385 0 : __Pyx_GOTREF(__pyx_t_6);
24386 0 : __pyx_v_dtype = __pyx_t_6;
24387 0 : __pyx_t_6 = 0;
24388 0 : goto __pyx_L13;
24389 : }
24390 : /*else*/ {
24391 0 : __Pyx_INCREF(Py_None);
24392 : __pyx_v_dtype = Py_None;
24393 : }
24394 0 : __pyx_L13:;
24395 0 : goto __pyx_L12;
24396 : }
24397 : /*else*/ {
24398 0 : __Pyx_INCREF(Py_None);
24399 : __pyx_v_dtype = Py_None;
24400 : }
24401 445 : __pyx_L12:;
24402 445 : __pyx_v_itemsize = -1L;
24403 445 : __pyx_t_2 = (__pyx_v_dtype != Py_None);
24404 445 : if (__pyx_t_2) {
24405 445 : __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 298, __pyx_L1_error)
24406 445 : __Pyx_GOTREF(__pyx_t_6);
24407 445 : __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 298, __pyx_L1_error)
24408 445 : __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
24409 445 : __pyx_v_itemsize = __pyx_t_5;
24410 445 : __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 298, __pyx_L1_error)
24411 445 : __Pyx_GOTREF(__pyx_t_6);
24412 445 : __pyx_t_7 = __Pyx_PyObject_Ord(__pyx_t_6); if (unlikely(__pyx_t_7 == ((long)(long)(Py_UCS4)-1))) __PYX_ERR(0, 298, __pyx_L1_error)
24413 445 : __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
24414 445 : __pyx_v_kind = __pyx_t_7;
24415 445 : __pyx_v_dtype_signed = (__pyx_v_kind == 0x69);
24416 445 : switch (__pyx_v_kind) {
24417 445 : case 0x69:
24418 : case 0x75:
24419 445 : __pyx_t_4 = ((sizeof(__pyx_t_5numpy_uint32_t const )) == __pyx_v_itemsize);
24420 445 : if (__pyx_t_4) {
24421 437 : } else {
24422 8 : __pyx_t_2 = __pyx_t_4;
24423 8 : goto __pyx_L16_bool_binop_done;
24424 : }
24425 437 : __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 298, __pyx_L1_error)
24426 437 : __Pyx_GOTREF(__pyx_t_6);
24427 437 : __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 298, __pyx_L1_error)
24428 437 : __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
24429 437 : __pyx_t_4 = (((Py_ssize_t)__pyx_t_5) == 2);
24430 437 : if (__pyx_t_4) {
24431 437 : } else {
24432 0 : __pyx_t_2 = __pyx_t_4;
24433 0 : goto __pyx_L16_bool_binop_done;
24434 : }
24435 437 : __pyx_t_4 = (!(__pyx_v___pyx_fused_dtype_const_uint32__t_is_signed ^ __pyx_v_dtype_signed));
24436 437 : __pyx_t_2 = __pyx_t_4;
24437 445 : __pyx_L16_bool_binop_done:;
24438 445 : if (__pyx_t_2) {
24439 437 : if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_uint32_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0))) __PYX_ERR(0, 298, __pyx_L1_error)
24440 437 : goto __pyx_L10_break;
24441 : }
24442 8 : __pyx_t_4 = ((sizeof(__pyx_t_5numpy_uint64_t const )) == __pyx_v_itemsize);
24443 8 : if (__pyx_t_4) {
24444 8 : } else {
24445 0 : __pyx_t_2 = __pyx_t_4;
24446 0 : goto __pyx_L20_bool_binop_done;
24447 : }
24448 8 : __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 298, __pyx_L1_error)
24449 8 : __Pyx_GOTREF(__pyx_t_6);
24450 8 : __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 298, __pyx_L1_error)
24451 8 : __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
24452 8 : __pyx_t_4 = (((Py_ssize_t)__pyx_t_5) == 2);
24453 8 : if (__pyx_t_4) {
24454 8 : } else {
24455 0 : __pyx_t_2 = __pyx_t_4;
24456 0 : goto __pyx_L20_bool_binop_done;
24457 : }
24458 8 : __pyx_t_4 = (!(__pyx_v___pyx_fused_dtype_const_uint64__t_is_signed ^ __pyx_v_dtype_signed));
24459 8 : __pyx_t_2 = __pyx_t_4;
24460 8 : __pyx_L20_bool_binop_done:;
24461 8 : if (__pyx_t_2) {
24462 8 : if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_uint64_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0))) __PYX_ERR(0, 298, __pyx_L1_error)
24463 8 : goto __pyx_L10_break;
24464 : }
24465 : break;
24466 : case 0x66:
24467 : break;
24468 : case 99:
24469 : break;
24470 : case 79:
24471 : break;
24472 : default: break;
24473 : }
24474 : }
24475 : }
24476 0 : __pyx_t_2 = (__pyx_v_arg == Py_None);
24477 0 : if (__pyx_t_2) {
24478 0 : if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_uint32_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0))) __PYX_ERR(0, 298, __pyx_L1_error)
24479 0 : goto __pyx_L10_break;
24480 : }
24481 : {
24482 0 : __Pyx_PyThreadState_declare
24483 0 : __Pyx_PyThreadState_assign
24484 0 : __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
24485 0 : __Pyx_XGOTREF(__pyx_t_8);
24486 0 : __Pyx_XGOTREF(__pyx_t_9);
24487 0 : __Pyx_XGOTREF(__pyx_t_10);
24488 : /*try:*/ {
24489 0 : __pyx_t_6 = PyMemoryView_FromObject(__pyx_v_arg); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 298, __pyx_L24_error)
24490 0 : __Pyx_GOTREF(__pyx_t_6);
24491 0 : __pyx_v_arg_as_memoryview = ((PyObject*)__pyx_t_6);
24492 0 : __pyx_t_6 = 0;
24493 : }
24494 : /*else:*/ {
24495 0 : __pyx_t_4 = (__pyx_v_itemsize == -1L);
24496 0 : if (!__pyx_t_4) {
24497 0 : goto __pyx_L35_next_or;
24498 : } else {
24499 0 : }
24500 0 : __pyx_t_5 = __Pyx_PyMemoryView_Get_itemsize(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 298, __pyx_L26_except_error)
24501 0 : __pyx_t_4 = (__pyx_t_5 == (sizeof(__pyx_t_5numpy_uint32_t const )));
24502 0 : if (!__pyx_t_4) {
24503 : } else {
24504 0 : goto __pyx_L34_next_and;
24505 : }
24506 0 : __pyx_L35_next_or:;
24507 0 : __pyx_t_4 = (__pyx_v_itemsize == (sizeof(__pyx_t_5numpy_uint32_t const )));
24508 0 : if (__pyx_t_4) {
24509 : } else {
24510 0 : __pyx_t_2 = __pyx_t_4;
24511 0 : goto __pyx_L33_bool_binop_done;
24512 : }
24513 0 : __pyx_L34_next_and:;
24514 0 : __pyx_t_11 = __Pyx_PyMemoryView_Get_ndim(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 298, __pyx_L26_except_error)
24515 0 : __pyx_t_4 = (__pyx_t_11 == 2);
24516 0 : __pyx_t_2 = __pyx_t_4;
24517 0 : __pyx_L33_bool_binop_done:;
24518 0 : if (__pyx_t_2) {
24519 0 : __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_5numpy_uint32_t__const__(__pyx_v_arg_as_memoryview, 0);
24520 0 : __pyx_v_memslice = __pyx_t_12;
24521 0 : __pyx_t_2 = (__pyx_v_memslice.memview != 0);
24522 0 : if (__pyx_t_2) {
24523 0 : __PYX_XCLEAR_MEMVIEW((&__pyx_v_memslice), 1);
24524 0 : if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_uint32_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0))) __PYX_ERR(0, 298, __pyx_L26_except_error)
24525 0 : goto __pyx_L29_try_break;
24526 : }
24527 : /*else*/ {
24528 0 : PyErr_Clear();
24529 : }
24530 : }
24531 0 : __pyx_t_4 = (__pyx_v_itemsize == -1L);
24532 0 : if (!__pyx_t_4) {
24533 0 : goto __pyx_L41_next_or;
24534 : } else {
24535 0 : }
24536 0 : __pyx_t_5 = __Pyx_PyMemoryView_Get_itemsize(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 298, __pyx_L26_except_error)
24537 0 : __pyx_t_4 = (__pyx_t_5 == (sizeof(__pyx_t_5numpy_uint64_t const )));
24538 0 : if (!__pyx_t_4) {
24539 : } else {
24540 0 : goto __pyx_L40_next_and;
24541 : }
24542 0 : __pyx_L41_next_or:;
24543 0 : __pyx_t_4 = (__pyx_v_itemsize == (sizeof(__pyx_t_5numpy_uint64_t const )));
24544 0 : if (__pyx_t_4) {
24545 : } else {
24546 0 : __pyx_t_2 = __pyx_t_4;
24547 0 : goto __pyx_L39_bool_binop_done;
24548 : }
24549 0 : __pyx_L40_next_and:;
24550 0 : __pyx_t_11 = __Pyx_PyMemoryView_Get_ndim(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 298, __pyx_L26_except_error)
24551 0 : __pyx_t_4 = (__pyx_t_11 == 2);
24552 0 : __pyx_t_2 = __pyx_t_4;
24553 0 : __pyx_L39_bool_binop_done:;
24554 0 : if (__pyx_t_2) {
24555 0 : __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_5numpy_uint64_t__const__(__pyx_v_arg_as_memoryview, 0);
24556 0 : __pyx_v_memslice = __pyx_t_12;
24557 0 : __pyx_t_2 = (__pyx_v_memslice.memview != 0);
24558 0 : if (__pyx_t_2) {
24559 0 : __PYX_XCLEAR_MEMVIEW((&__pyx_v_memslice), 1);
24560 0 : if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_uint64_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0))) __PYX_ERR(0, 298, __pyx_L26_except_error)
24561 0 : goto __pyx_L29_try_break;
24562 : }
24563 : /*else*/ {
24564 0 : PyErr_Clear();
24565 : }
24566 : }
24567 : }
24568 0 : __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
24569 0 : __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
24570 0 : __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
24571 0 : goto __pyx_L31_try_end;
24572 0 : __pyx_L24_error:;
24573 0 : __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
24574 0 : __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
24575 0 : __pyx_t_11 = __Pyx_PyErr_ExceptionMatches2(__pyx_builtin_ValueError, __pyx_builtin_TypeError);
24576 0 : if (__pyx_t_11) {
24577 0 : __Pyx_AddTraceback("scipy.stats._sobol.__pyx_fused_cpdef", __pyx_clineno, __pyx_lineno, __pyx_filename);
24578 0 : if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_1, &__pyx_t_13) < 0) __PYX_ERR(0, 298, __pyx_L26_except_error)
24579 0 : __Pyx_XGOTREF(__pyx_t_6);
24580 0 : __Pyx_XGOTREF(__pyx_t_1);
24581 0 : __Pyx_XGOTREF(__pyx_t_13);
24582 0 : __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
24583 0 : __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
24584 0 : __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
24585 0 : goto __pyx_L25_exception_handled;
24586 : }
24587 0 : goto __pyx_L26_except_error;
24588 0 : __pyx_L26_except_error:;
24589 0 : __Pyx_XGIVEREF(__pyx_t_8);
24590 0 : __Pyx_XGIVEREF(__pyx_t_9);
24591 0 : __Pyx_XGIVEREF(__pyx_t_10);
24592 0 : __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
24593 0 : goto __pyx_L1_error;
24594 0 : __pyx_L29_try_break:;
24595 0 : __Pyx_XGIVEREF(__pyx_t_8);
24596 0 : __Pyx_XGIVEREF(__pyx_t_9);
24597 0 : __Pyx_XGIVEREF(__pyx_t_10);
24598 0 : __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
24599 0 : goto __pyx_L10_break;
24600 0 : __pyx_L25_exception_handled:;
24601 0 : __Pyx_XGIVEREF(__pyx_t_8);
24602 0 : __Pyx_XGIVEREF(__pyx_t_9);
24603 0 : __Pyx_XGIVEREF(__pyx_t_10);
24604 0 : __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
24605 0 : __pyx_L31_try_end:;
24606 : }
24607 0 : if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0))) __PYX_ERR(0, 298, __pyx_L1_error)
24608 0 : goto __pyx_L10_break;
24609 : }
24610 445 : __pyx_L10_break:;
24611 445 : __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v__fused_sigindex); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 298, __pyx_L1_error)
24612 445 : __pyx_t_4 = (!__pyx_t_2);
24613 445 : if (__pyx_t_4) {
24614 2 : __pyx_t_5 = 0;
24615 2 : if (unlikely(__pyx_v_signatures == Py_None)) {
24616 0 : PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
24617 0 : __PYX_ERR(0, 298, __pyx_L1_error)
24618 : }
24619 4 : __pyx_t_1 = __Pyx_dict_iterator(((PyObject*)__pyx_v_signatures), 1, ((PyObject *)NULL), (&__pyx_t_14), (&__pyx_t_11)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 298, __pyx_L1_error)
24620 2 : __Pyx_GOTREF(__pyx_t_1);
24621 2 : __Pyx_XDECREF(__pyx_t_13);
24622 2 : __pyx_t_13 = __pyx_t_1;
24623 2 : __pyx_t_1 = 0;
24624 6 : while (1) {
24625 6 : __pyx_t_15 = __Pyx_dict_iter_next(__pyx_t_13, __pyx_t_14, &__pyx_t_5, &__pyx_t_1, NULL, NULL, __pyx_t_11);
24626 6 : if (unlikely(__pyx_t_15 == 0)) break;
24627 4 : if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 298, __pyx_L1_error)
24628 4 : __Pyx_GOTREF(__pyx_t_1);
24629 4 : __Pyx_XDECREF_SET(__pyx_v_sig, __pyx_t_1);
24630 4 : __pyx_t_1 = 0;
24631 4 : __pyx_t_1 = __pyx_v__fused_sigindex;
24632 4 : __Pyx_INCREF(__pyx_t_1);
24633 4 : __Pyx_XDECREF_SET(__pyx_v_sigindex_node, ((PyObject*)__pyx_t_1));
24634 4 : __pyx_t_1 = 0;
24635 4 : __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_strip); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 298, __pyx_L1_error)
24636 4 : __Pyx_GOTREF(__pyx_t_16);
24637 4 : __pyx_t_17 = NULL;
24638 4 : __pyx_t_18 = 0;
24639 : #if CYTHON_UNPACK_METHODS
24640 4 : if (likely(PyMethod_Check(__pyx_t_16))) {
24641 0 : __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_16);
24642 0 : if (likely(__pyx_t_17)) {
24643 0 : PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
24644 0 : __Pyx_INCREF(__pyx_t_17);
24645 0 : __Pyx_INCREF(function);
24646 0 : __Pyx_DECREF_SET(__pyx_t_16, function);
24647 : __pyx_t_18 = 1;
24648 : }
24649 : }
24650 : #endif
24651 : {
24652 4 : PyObject *__pyx_callargs[2] = {__pyx_t_17, __pyx_kp_s__16};
24653 4 : __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_18, 1+__pyx_t_18);
24654 4 : __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
24655 4 : if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 298, __pyx_L1_error)
24656 4 : __Pyx_GOTREF(__pyx_t_6);
24657 4 : __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
24658 : }
24659 4 : __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_split); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 298, __pyx_L1_error)
24660 4 : __Pyx_GOTREF(__pyx_t_16);
24661 4 : __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
24662 4 : __pyx_t_6 = NULL;
24663 4 : __pyx_t_18 = 0;
24664 : #if CYTHON_UNPACK_METHODS
24665 4 : if (likely(PyMethod_Check(__pyx_t_16))) {
24666 0 : __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_16);
24667 0 : if (likely(__pyx_t_6)) {
24668 0 : PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
24669 0 : __Pyx_INCREF(__pyx_t_6);
24670 0 : __Pyx_INCREF(function);
24671 0 : __Pyx_DECREF_SET(__pyx_t_16, function);
24672 : __pyx_t_18 = 1;
24673 : }
24674 : }
24675 : #endif
24676 : {
24677 4 : PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_kp_s__17};
24678 4 : __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_18, 1+__pyx_t_18);
24679 4 : __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
24680 4 : if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 298, __pyx_L1_error)
24681 4 : __Pyx_GOTREF(__pyx_t_1);
24682 4 : __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
24683 : }
24684 8 : __pyx_t_16 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 298, __pyx_L1_error)
24685 4 : __Pyx_GOTREF(__pyx_t_16);
24686 4 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24687 4 : __pyx_t_19 = PyList_GET_SIZE(__pyx_t_16);
24688 4 : if (unlikely(__pyx_t_19 < 1)) {
24689 0 : __Pyx_RaiseNeedMoreValuesError(0+__pyx_t_19); __PYX_ERR(0, 298, __pyx_L1_error)
24690 : }
24691 : #if CYTHON_COMPILING_IN_CPYTHON
24692 4 : __pyx_t_6 = PyList_GET_ITEM(__pyx_t_16, __pyx_t_19-1);
24693 4 : ((PyVarObject*)__pyx_t_16)->ob_size--;
24694 : #else
24695 : __pyx_t_6 = PySequence_ITEM(__pyx_t_16, __pyx_t_19-1);
24696 : #endif
24697 4 : __Pyx_GOTREF(__pyx_t_6);
24698 : #if !CYTHON_COMPILING_IN_CPYTHON
24699 : __pyx_t_17 = PySequence_GetSlice(__pyx_t_16, 0, __pyx_t_19-1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 298, __pyx_L1_error)
24700 : __Pyx_GOTREF(__pyx_t_17);
24701 : __Pyx_DECREF(__pyx_t_16);
24702 : __pyx_t_16 = __pyx_t_17; __pyx_t_17 = NULL;
24703 : #else
24704 4 : CYTHON_UNUSED_VAR(__pyx_t_17);
24705 : #endif
24706 4 : __Pyx_XDECREF_SET(__pyx_v_sig_series, ((PyObject*)__pyx_t_16));
24707 4 : __pyx_t_16 = 0;
24708 4 : __Pyx_XDECREF_SET(__pyx_v_last_type, __pyx_t_6);
24709 4 : __pyx_t_6 = 0;
24710 4 : __pyx_t_1 = __pyx_v_sig_series; __Pyx_INCREF(__pyx_t_1);
24711 : __pyx_t_19 = 0;
24712 4 : for (;;) {
24713 : {
24714 4 : Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
24715 : #if !CYTHON_ASSUME_SAFE_MACROS
24716 : if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 298, __pyx_L1_error)
24717 : #endif
24718 4 : if (__pyx_t_19 >= __pyx_temp) break;
24719 : }
24720 : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
24721 0 : __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_19); __Pyx_INCREF(__pyx_t_6); __pyx_t_19++; if (unlikely((0 < 0))) __PYX_ERR(0, 298, __pyx_L1_error)
24722 : #else
24723 : __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_19); __pyx_t_19++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 298, __pyx_L1_error)
24724 : __Pyx_GOTREF(__pyx_t_6);
24725 : #endif
24726 0 : __Pyx_XDECREF_SET(__pyx_v_sig_type, __pyx_t_6);
24727 0 : __pyx_t_6 = 0;
24728 0 : if (unlikely(__pyx_v_sigindex_node == Py_None)) {
24729 0 : PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
24730 0 : __PYX_ERR(0, 298, __pyx_L1_error)
24731 : }
24732 0 : __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_v_sig_type, __pyx_v_sigindex_node, Py_NE)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 298, __pyx_L1_error)
24733 0 : if (__pyx_t_4) {
24734 0 : __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 298, __pyx_L1_error)
24735 0 : __Pyx_GOTREF(__pyx_t_6);
24736 0 : if (unlikely(__pyx_v_sigindex_node == Py_None)) {
24737 : PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
24738 : __PYX_ERR(0, 298, __pyx_L1_error)
24739 : }
24740 0 : if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_sig_type, __pyx_t_6) < 0))) __PYX_ERR(0, 298, __pyx_L1_error)
24741 0 : __Pyx_INCREF(__pyx_t_6);
24742 0 : __Pyx_DECREF_SET(__pyx_v_sigindex_node, __pyx_t_6);
24743 0 : __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
24744 0 : goto __pyx_L51;
24745 : }
24746 : /*else*/ {
24747 0 : if (unlikely(__pyx_v_sigindex_node == Py_None)) {
24748 : PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
24749 : __PYX_ERR(0, 298, __pyx_L1_error)
24750 : }
24751 0 : __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_sigindex_node, __pyx_v_sig_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 298, __pyx_L1_error)
24752 0 : __Pyx_GOTREF(__pyx_t_6);
24753 0 : __pyx_t_16 = __pyx_t_6;
24754 0 : __Pyx_INCREF(__pyx_t_16);
24755 0 : __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
24756 4 : __Pyx_DECREF_SET(__pyx_v_sigindex_node, ((PyObject*)__pyx_t_16));
24757 : __pyx_t_16 = 0;
24758 : }
24759 : __pyx_L51:;
24760 : }
24761 4 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24762 4 : if (unlikely(__pyx_v_sigindex_node == Py_None)) {
24763 0 : PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
24764 0 : __PYX_ERR(0, 298, __pyx_L1_error)
24765 : }
24766 4 : if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_last_type, __pyx_v_sig) < 0))) __PYX_ERR(0, 298, __pyx_L1_error)
24767 : }
24768 4 : __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
24769 : }
24770 445 : __pyx_t_13 = PyList_New(0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 298, __pyx_L1_error)
24771 445 : __Pyx_GOTREF(__pyx_t_13);
24772 445 : __pyx_v_sigindex_matches = ((PyObject*)__pyx_t_13);
24773 445 : __pyx_t_13 = 0;
24774 445 : __pyx_t_13 = PyList_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 298, __pyx_L1_error)
24775 445 : __Pyx_GOTREF(__pyx_t_13);
24776 445 : __Pyx_INCREF(__pyx_v__fused_sigindex);
24777 445 : __Pyx_GIVEREF(__pyx_v__fused_sigindex);
24778 445 : if (__Pyx_PyList_SET_ITEM(__pyx_t_13, 0, __pyx_v__fused_sigindex)) __PYX_ERR(0, 298, __pyx_L1_error);
24779 445 : __pyx_v_sigindex_candidates = ((PyObject*)__pyx_t_13);
24780 445 : __pyx_t_13 = 0;
24781 445 : __pyx_t_13 = __pyx_v_dest_sig; __Pyx_INCREF(__pyx_t_13);
24782 : __pyx_t_14 = 0;
24783 890 : for (;;) {
24784 : {
24785 890 : Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_13);
24786 : #if !CYTHON_ASSUME_SAFE_MACROS
24787 : if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 298, __pyx_L1_error)
24788 : #endif
24789 890 : if (__pyx_t_14 >= __pyx_temp) break;
24790 : }
24791 : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
24792 445 : __pyx_t_1 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_14); __Pyx_INCREF(__pyx_t_1); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(0, 298, __pyx_L1_error)
24793 : #else
24794 : __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_13, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 298, __pyx_L1_error)
24795 : __Pyx_GOTREF(__pyx_t_1);
24796 : #endif
24797 445 : __Pyx_XDECREF_SET(__pyx_v_dst_type, __pyx_t_1);
24798 445 : __pyx_t_1 = 0;
24799 445 : __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 298, __pyx_L1_error)
24800 445 : __Pyx_GOTREF(__pyx_t_1);
24801 445 : __Pyx_XDECREF_SET(__pyx_v_found_matches, ((PyObject*)__pyx_t_1));
24802 445 : __pyx_t_1 = 0;
24803 445 : __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 298, __pyx_L1_error)
24804 445 : __Pyx_GOTREF(__pyx_t_1);
24805 445 : __Pyx_XDECREF_SET(__pyx_v_found_candidates, ((PyObject*)__pyx_t_1));
24806 445 : __pyx_t_1 = 0;
24807 445 : __pyx_t_4 = (__pyx_v_dst_type == Py_None);
24808 445 : if (__pyx_t_4) {
24809 0 : __pyx_t_1 = __pyx_v_sigindex_matches; __Pyx_INCREF(__pyx_t_1);
24810 0 : __pyx_t_5 = 0;
24811 0 : for (;;) {
24812 : {
24813 0 : Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
24814 : #if !CYTHON_ASSUME_SAFE_MACROS
24815 : if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 298, __pyx_L1_error)
24816 : #endif
24817 0 : if (__pyx_t_5 >= __pyx_temp) break;
24818 : }
24819 : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
24820 0 : __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 298, __pyx_L1_error)
24821 : #else
24822 : __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 298, __pyx_L1_error)
24823 : __Pyx_GOTREF(__pyx_t_16);
24824 : #endif
24825 0 : __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_16);
24826 0 : __pyx_t_16 = 0;
24827 0 : if (unlikely(__pyx_v_sn == Py_None)) {
24828 0 : PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values");
24829 0 : __PYX_ERR(0, 298, __pyx_L1_error)
24830 : }
24831 0 : __pyx_t_16 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 298, __pyx_L1_error)
24832 0 : __Pyx_GOTREF(__pyx_t_16);
24833 0 : __pyx_t_20 = __Pyx_PyList_Extend(__pyx_v_found_matches, __pyx_t_16); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 298, __pyx_L1_error)
24834 0 : __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
24835 : }
24836 0 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24837 0 : __pyx_t_1 = __pyx_v_sigindex_candidates; __Pyx_INCREF(__pyx_t_1);
24838 0 : __pyx_t_5 = 0;
24839 0 : for (;;) {
24840 : {
24841 0 : Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
24842 : #if !CYTHON_ASSUME_SAFE_MACROS
24843 : if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 298, __pyx_L1_error)
24844 : #endif
24845 0 : if (__pyx_t_5 >= __pyx_temp) break;
24846 : }
24847 : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
24848 0 : __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 298, __pyx_L1_error)
24849 : #else
24850 : __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 298, __pyx_L1_error)
24851 : __Pyx_GOTREF(__pyx_t_16);
24852 : #endif
24853 0 : __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_16);
24854 0 : __pyx_t_16 = 0;
24855 0 : if (unlikely(__pyx_v_sn == Py_None)) {
24856 0 : PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values");
24857 0 : __PYX_ERR(0, 298, __pyx_L1_error)
24858 : }
24859 0 : __pyx_t_16 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 298, __pyx_L1_error)
24860 0 : __Pyx_GOTREF(__pyx_t_16);
24861 0 : __pyx_t_20 = __Pyx_PyList_Extend(__pyx_v_found_candidates, __pyx_t_16); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 298, __pyx_L1_error)
24862 0 : __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
24863 : }
24864 0 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24865 0 : goto __pyx_L55;
24866 : }
24867 : /*else*/ {
24868 445 : __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 298, __pyx_L1_error)
24869 445 : __Pyx_GOTREF(__pyx_t_1);
24870 445 : __Pyx_INCREF(__pyx_v_sigindex_matches);
24871 445 : __Pyx_GIVEREF(__pyx_v_sigindex_matches);
24872 445 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_sigindex_matches)) __PYX_ERR(0, 298, __pyx_L1_error);
24873 445 : __Pyx_INCREF(__pyx_v_sigindex_candidates);
24874 445 : __Pyx_GIVEREF(__pyx_v_sigindex_candidates);
24875 445 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_sigindex_candidates)) __PYX_ERR(0, 298, __pyx_L1_error);
24876 445 : __pyx_t_16 = __pyx_t_1; __Pyx_INCREF(__pyx_t_16);
24877 445 : __pyx_t_5 = 0;
24878 890 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24879 2225 : for (;;) {
24880 1335 : if (__pyx_t_5 >= 2) break;
24881 : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
24882 890 : __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_16, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 298, __pyx_L1_error)
24883 : #else
24884 : __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_16, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 298, __pyx_L1_error)
24885 : __Pyx_GOTREF(__pyx_t_1);
24886 : #endif
24887 890 : __Pyx_XDECREF_SET(__pyx_v_search_list, ((PyObject*)__pyx_t_1));
24888 890 : __pyx_t_1 = 0;
24889 890 : if (unlikely(__pyx_v_search_list == Py_None)) {
24890 0 : PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
24891 0 : __PYX_ERR(0, 298, __pyx_L1_error)
24892 : }
24893 890 : __pyx_t_1 = __pyx_v_search_list; __Pyx_INCREF(__pyx_t_1);
24894 : __pyx_t_19 = 0;
24895 1335 : for (;;) {
24896 : {
24897 1335 : Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
24898 : #if !CYTHON_ASSUME_SAFE_MACROS
24899 : if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 298, __pyx_L1_error)
24900 : #endif
24901 1335 : if (__pyx_t_19 >= __pyx_temp) break;
24902 : }
24903 : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
24904 445 : __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_19); __Pyx_INCREF(__pyx_t_6); __pyx_t_19++; if (unlikely((0 < 0))) __PYX_ERR(0, 298, __pyx_L1_error)
24905 : #else
24906 : __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_19); __pyx_t_19++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 298, __pyx_L1_error)
24907 : __Pyx_GOTREF(__pyx_t_6);
24908 : #endif
24909 445 : __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_6);
24910 445 : __pyx_t_6 = 0;
24911 445 : if (unlikely(__pyx_v_sn == Py_None)) {
24912 0 : PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
24913 0 : __PYX_ERR(0, 298, __pyx_L1_error)
24914 : }
24915 445 : __pyx_t_6 = __Pyx_PyDict_GetItemDefault(((PyObject*)__pyx_v_sn), __pyx_v_dst_type, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 298, __pyx_L1_error)
24916 445 : __Pyx_GOTREF(__pyx_t_6);
24917 445 : __Pyx_XDECREF_SET(__pyx_v_type_match, __pyx_t_6);
24918 445 : __pyx_t_6 = 0;
24919 445 : __pyx_t_4 = (__pyx_v_type_match != Py_None);
24920 445 : if (__pyx_t_4) {
24921 445 : __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_found_matches, __pyx_v_type_match); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 298, __pyx_L1_error)
24922 : }
24923 : }
24924 1780 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24925 : }
24926 445 : __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
24927 : }
24928 445 : __pyx_L55:;
24929 445 : __Pyx_INCREF(__pyx_v_found_matches);
24930 445 : __Pyx_DECREF_SET(__pyx_v_sigindex_matches, __pyx_v_found_matches);
24931 445 : __Pyx_INCREF(__pyx_v_found_candidates);
24932 445 : __Pyx_DECREF_SET(__pyx_v_sigindex_candidates, __pyx_v_found_candidates);
24933 445 : __pyx_t_2 = (PyList_GET_SIZE(__pyx_v_found_matches) != 0);
24934 445 : if (!__pyx_t_2) {
24935 0 : } else {
24936 445 : __pyx_t_4 = __pyx_t_2;
24937 445 : goto __pyx_L70_bool_binop_done;
24938 : }
24939 0 : __pyx_t_2 = (PyList_GET_SIZE(__pyx_v_found_candidates) != 0);
24940 0 : __pyx_t_4 = __pyx_t_2;
24941 445 : __pyx_L70_bool_binop_done:;
24942 445 : __pyx_t_2 = (!__pyx_t_4);
24943 445 : if (__pyx_t_2) {
24944 0 : goto __pyx_L54_break;
24945 : }
24946 : }
24947 445 : __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
24948 445 : goto __pyx_L72_for_end;
24949 0 : __pyx_L54_break:;
24950 0 : __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
24951 0 : goto __pyx_L72_for_end;
24952 445 : __pyx_L72_for_end:;
24953 445 : __Pyx_INCREF(__pyx_v_sigindex_matches);
24954 445 : __pyx_v_candidates = __pyx_v_sigindex_matches;
24955 445 : __pyx_t_2 = (PyList_GET_SIZE(__pyx_v_candidates) != 0);
24956 445 : __pyx_t_4 = (!__pyx_t_2);
24957 445 : if (unlikely(__pyx_t_4)) {
24958 0 : __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 298, __pyx_L1_error)
24959 0 : __Pyx_GOTREF(__pyx_t_13);
24960 0 : __Pyx_Raise(__pyx_t_13, 0, 0, 0);
24961 0 : __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
24962 0 : __PYX_ERR(0, 298, __pyx_L1_error)
24963 : }
24964 445 : __pyx_t_14 = __Pyx_PyList_GET_SIZE(__pyx_v_candidates); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 298, __pyx_L1_error)
24965 445 : __pyx_t_4 = (__pyx_t_14 > 1);
24966 445 : if (unlikely(__pyx_t_4)) {
24967 0 : __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 298, __pyx_L1_error)
24968 0 : __Pyx_GOTREF(__pyx_t_13);
24969 0 : __Pyx_Raise(__pyx_t_13, 0, 0, 0);
24970 0 : __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
24971 0 : __PYX_ERR(0, 298, __pyx_L1_error)
24972 : }
24973 : /*else*/ {
24974 445 : __Pyx_XDECREF(__pyx_r);
24975 445 : if (unlikely(__pyx_v_signatures == Py_None)) {
24976 0 : PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
24977 0 : __PYX_ERR(0, 298, __pyx_L1_error)
24978 : }
24979 445 : __pyx_t_13 = __Pyx_GetItemInt_List(__pyx_v_candidates, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 298, __pyx_L1_error)
24980 445 : __Pyx_GOTREF(__pyx_t_13);
24981 445 : __pyx_t_16 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_signatures), __pyx_t_13); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 298, __pyx_L1_error)
24982 445 : __Pyx_GOTREF(__pyx_t_16);
24983 445 : __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
24984 445 : __pyx_r = __pyx_t_16;
24985 445 : __pyx_t_16 = 0;
24986 445 : goto __pyx_L0;
24987 : }
24988 :
24989 : /* function exit code */
24990 0 : __pyx_L1_error:;
24991 0 : __Pyx_XDECREF(__pyx_t_1);
24992 0 : __Pyx_XDECREF(__pyx_t_6);
24993 0 : __Pyx_XDECREF(__pyx_t_13);
24994 0 : __Pyx_XDECREF(__pyx_t_16);
24995 0 : __Pyx_XDECREF(__pyx_t_17);
24996 0 : __Pyx_AddTraceback("scipy.stats._sobol.__pyx_fused_cpdef", __pyx_clineno, __pyx_lineno, __pyx_filename);
24997 0 : __pyx_r = NULL;
24998 445 : __pyx_L0:;
24999 445 : __Pyx_XDECREF(__pyx_v_search_list);
25000 445 : __Pyx_XDECREF(__pyx_v_sigindex_node);
25001 445 : __Pyx_XDECREF(__pyx_v_dest_sig);
25002 445 : __Pyx_XDECREF((PyObject *)__pyx_v_ndarray);
25003 445 : __Pyx_XDECREF(__pyx_v_arg_as_memoryview);
25004 445 : __Pyx_XDECREF(__pyx_v_arg);
25005 445 : __Pyx_XDECREF(__pyx_v_dtype);
25006 445 : __Pyx_XDECREF(__pyx_v_arg_base);
25007 445 : __Pyx_XDECREF(__pyx_v_sig);
25008 445 : __Pyx_XDECREF(__pyx_v_sig_series);
25009 445 : __Pyx_XDECREF(__pyx_v_last_type);
25010 445 : __Pyx_XDECREF(__pyx_v_sig_type);
25011 445 : __Pyx_XDECREF(__pyx_v_sigindex_matches);
25012 445 : __Pyx_XDECREF(__pyx_v_sigindex_candidates);
25013 445 : __Pyx_XDECREF(__pyx_v_dst_type);
25014 445 : __Pyx_XDECREF(__pyx_v_found_matches);
25015 445 : __Pyx_XDECREF(__pyx_v_found_candidates);
25016 445 : __Pyx_XDECREF(__pyx_v_sn);
25017 445 : __Pyx_XDECREF(__pyx_v_type_match);
25018 445 : __Pyx_XDECREF(__pyx_v_candidates);
25019 445 : __Pyx_XDECREF(__pyx_v_kwargs);
25020 445 : __Pyx_XGIVEREF(__pyx_r);
25021 445 : __Pyx_RefNannyFinishContext();
25022 445 : return __pyx_r;
25023 : }
25024 :
25025 : /* Python wrapper */
25026 : static PyObject *__pyx_fuse_0__pyx_pw_5scipy_5stats_6_sobol_25_draw(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
25027 : static PyMethodDef __pyx_fuse_0__pyx_mdef_5scipy_5stats_6_sobol_25_draw = {"__pyx_fuse_0_draw", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_fuse_0__pyx_pw_5scipy_5stats_6_sobol_25_draw, METH_VARARGS|METH_KEYWORDS, 0};
25028 437 : static PyObject *__pyx_fuse_0__pyx_pw_5scipy_5stats_6_sobol_25_draw(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
25029 437 : PyObject *__pyx_v_n = 0;
25030 437 : PyObject *__pyx_v_num_gen = 0;
25031 437 : int __pyx_v_dim;
25032 437 : __pyx_t_5numpy_float64_t __pyx_v_scale;
25033 437 : __Pyx_memviewslice __pyx_v_sv = { 0, 0, { 0 }, { 0 }, { 0 } };
25034 437 : __Pyx_memviewslice __pyx_v_quasi = { 0, 0, { 0 }, { 0 }, { 0 } };
25035 437 : __Pyx_memviewslice __pyx_v_sample = { 0, 0, { 0 }, { 0 }, { 0 } };
25036 437 : CYTHON_UNUSED Py_ssize_t __pyx_nargs;
25037 437 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
25038 437 : PyObject* values[7] = {0,0,0,0,0,0,0};
25039 437 : int __pyx_lineno = 0;
25040 437 : const char *__pyx_filename = NULL;
25041 437 : int __pyx_clineno = 0;
25042 437 : PyObject *__pyx_r = 0;
25043 : __Pyx_RefNannyDeclarations
25044 437 : __Pyx_RefNannySetupContext("_draw (wrapper)", 0);
25045 : #if CYTHON_ASSUME_SAFE_MACROS
25046 437 : __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
25047 : #else
25048 : __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
25049 : #endif
25050 437 : __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
25051 : {
25052 437 : PyObject **__pyx_pyargnames[] = {&__pyx_n_s_n,&__pyx_n_s_num_gen,&__pyx_n_s_dim,&__pyx_n_s_scale,&__pyx_n_s_sv,&__pyx_n_s_quasi,&__pyx_n_s_sample,0};
25053 437 : if (__pyx_kwds) {
25054 437 : Py_ssize_t kw_args;
25055 437 : switch (__pyx_nargs) {
25056 0 : case 7: values[6] = __Pyx_Arg_VARARGS(__pyx_args, 6);
25057 0 : CYTHON_FALLTHROUGH;
25058 0 : case 6: values[5] = __Pyx_Arg_VARARGS(__pyx_args, 5);
25059 0 : CYTHON_FALLTHROUGH;
25060 0 : case 5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
25061 0 : CYTHON_FALLTHROUGH;
25062 0 : case 4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
25063 0 : CYTHON_FALLTHROUGH;
25064 0 : case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
25065 0 : CYTHON_FALLTHROUGH;
25066 0 : case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
25067 0 : CYTHON_FALLTHROUGH;
25068 0 : case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
25069 437 : CYTHON_FALLTHROUGH;
25070 437 : case 0: break;
25071 0 : default: goto __pyx_L5_argtuple_error;
25072 : }
25073 437 : kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
25074 437 : switch (__pyx_nargs) {
25075 437 : case 0:
25076 437 : if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_n)) != 0)) {
25077 437 : (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
25078 437 : kw_args--;
25079 : }
25080 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 298, __pyx_L3_error)
25081 0 : else goto __pyx_L5_argtuple_error;
25082 437 : CYTHON_FALLTHROUGH;
25083 : case 1:
25084 437 : if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_num_gen)) != 0)) {
25085 437 : (void)__Pyx_Arg_NewRef_VARARGS(values[1]);
25086 437 : kw_args--;
25087 : }
25088 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 298, __pyx_L3_error)
25089 : else {
25090 0 : __Pyx_RaiseArgtupleInvalid("_draw", 1, 7, 7, 1); __PYX_ERR(0, 298, __pyx_L3_error)
25091 : }
25092 437 : CYTHON_FALLTHROUGH;
25093 : case 2:
25094 437 : if (likely((values[2] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_dim)) != 0)) {
25095 437 : (void)__Pyx_Arg_NewRef_VARARGS(values[2]);
25096 437 : kw_args--;
25097 : }
25098 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 298, __pyx_L3_error)
25099 : else {
25100 0 : __Pyx_RaiseArgtupleInvalid("_draw", 1, 7, 7, 2); __PYX_ERR(0, 298, __pyx_L3_error)
25101 : }
25102 437 : CYTHON_FALLTHROUGH;
25103 : case 3:
25104 437 : if (likely((values[3] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_scale)) != 0)) {
25105 437 : (void)__Pyx_Arg_NewRef_VARARGS(values[3]);
25106 437 : kw_args--;
25107 : }
25108 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 298, __pyx_L3_error)
25109 : else {
25110 0 : __Pyx_RaiseArgtupleInvalid("_draw", 1, 7, 7, 3); __PYX_ERR(0, 298, __pyx_L3_error)
25111 : }
25112 437 : CYTHON_FALLTHROUGH;
25113 : case 4:
25114 437 : if (likely((values[4] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_sv)) != 0)) {
25115 437 : (void)__Pyx_Arg_NewRef_VARARGS(values[4]);
25116 437 : kw_args--;
25117 : }
25118 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 298, __pyx_L3_error)
25119 : else {
25120 0 : __Pyx_RaiseArgtupleInvalid("_draw", 1, 7, 7, 4); __PYX_ERR(0, 298, __pyx_L3_error)
25121 : }
25122 437 : CYTHON_FALLTHROUGH;
25123 : case 5:
25124 437 : if (likely((values[5] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_quasi)) != 0)) {
25125 437 : (void)__Pyx_Arg_NewRef_VARARGS(values[5]);
25126 437 : kw_args--;
25127 : }
25128 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 298, __pyx_L3_error)
25129 : else {
25130 0 : __Pyx_RaiseArgtupleInvalid("_draw", 1, 7, 7, 5); __PYX_ERR(0, 298, __pyx_L3_error)
25131 : }
25132 437 : CYTHON_FALLTHROUGH;
25133 : case 6:
25134 437 : if (likely((values[6] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_sample)) != 0)) {
25135 437 : (void)__Pyx_Arg_NewRef_VARARGS(values[6]);
25136 437 : kw_args--;
25137 : }
25138 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 298, __pyx_L3_error)
25139 : else {
25140 0 : __Pyx_RaiseArgtupleInvalid("_draw", 1, 7, 7, 6); __PYX_ERR(0, 298, __pyx_L3_error)
25141 : }
25142 : }
25143 437 : if (unlikely(kw_args > 0)) {
25144 0 : const Py_ssize_t kwd_pos_args = __pyx_nargs;
25145 0 : if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_draw") < 0)) __PYX_ERR(0, 298, __pyx_L3_error)
25146 : }
25147 0 : } else if (unlikely(__pyx_nargs != 7)) {
25148 0 : goto __pyx_L5_argtuple_error;
25149 : } else {
25150 0 : values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
25151 0 : values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
25152 0 : values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
25153 0 : values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
25154 0 : values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
25155 0 : values[5] = __Pyx_Arg_VARARGS(__pyx_args, 5);
25156 0 : values[6] = __Pyx_Arg_VARARGS(__pyx_args, 6);
25157 : }
25158 437 : __pyx_v_n = values[0];
25159 437 : __pyx_v_num_gen = values[1];
25160 437 : __pyx_v_dim = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_dim == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 301, __pyx_L3_error)
25161 437 : __pyx_v_scale = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_scale == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 302, __pyx_L3_error)
25162 437 : __pyx_v_sv = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_5numpy_uint32_t__const__(values[4], 0); if (unlikely(!__pyx_v_sv.memview)) __PYX_ERR(0, 303, __pyx_L3_error)
25163 437 : __pyx_v_quasi = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_uint32_t(values[5], PyBUF_WRITABLE); if (unlikely(!__pyx_v_quasi.memview)) __PYX_ERR(0, 304, __pyx_L3_error)
25164 437 : __pyx_v_sample = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_5numpy_float64_t(values[6], PyBUF_WRITABLE); if (unlikely(!__pyx_v_sample.memview)) __PYX_ERR(0, 305, __pyx_L3_error)
25165 : }
25166 437 : goto __pyx_L6_skip;
25167 0 : __pyx_L5_argtuple_error:;
25168 0 : __Pyx_RaiseArgtupleInvalid("_draw", 1, 7, 7, __pyx_nargs); __PYX_ERR(0, 298, __pyx_L3_error)
25169 437 : __pyx_L6_skip:;
25170 437 : goto __pyx_L4_argument_unpacking_done;
25171 0 : __pyx_L3_error:;
25172 : {
25173 0 : Py_ssize_t __pyx_temp;
25174 0 : for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
25175 : __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
25176 : }
25177 : }
25178 0 : __PYX_XCLEAR_MEMVIEW(&__pyx_v_sv, 1);
25179 0 : __PYX_XCLEAR_MEMVIEW(&__pyx_v_quasi, 1);
25180 0 : __PYX_XCLEAR_MEMVIEW(&__pyx_v_sample, 1);
25181 0 : __Pyx_AddTraceback("scipy.stats._sobol._draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
25182 0 : __Pyx_RefNannyFinishContext();
25183 0 : return NULL;
25184 437 : __pyx_L4_argument_unpacking_done:;
25185 437 : __pyx_r = __pyx_pf_5scipy_5stats_6_sobol_24_draw(__pyx_self, __pyx_v_n, __pyx_v_num_gen, __pyx_v_dim, __pyx_v_scale, __pyx_v_sv, __pyx_v_quasi, __pyx_v_sample);
25186 :
25187 : /* function exit code */
25188 437 : __PYX_XCLEAR_MEMVIEW(&__pyx_v_sv, 1);
25189 437 : __PYX_XCLEAR_MEMVIEW(&__pyx_v_quasi, 1);
25190 437 : __PYX_XCLEAR_MEMVIEW(&__pyx_v_sample, 1);
25191 : {
25192 437 : Py_ssize_t __pyx_temp;
25193 437 : for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
25194 : __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
25195 : }
25196 : }
25197 : __Pyx_RefNannyFinishContext();
25198 : return __pyx_r;
25199 : }
25200 :
25201 437 : static PyObject *__pyx_pf_5scipy_5stats_6_sobol_24_draw(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n, PyObject *__pyx_v_num_gen, int __pyx_v_dim, __pyx_t_5numpy_float64_t __pyx_v_scale, __Pyx_memviewslice __pyx_v_sv, __Pyx_memviewslice __pyx_v_quasi, __Pyx_memviewslice __pyx_v_sample) {
25202 437 : __pyx_t_5numpy_uint32_t __pyx_v_n_;
25203 437 : __pyx_t_5numpy_uint32_t __pyx_v_num_gen_;
25204 437 : PyObject *__pyx_r = NULL;
25205 : __Pyx_RefNannyDeclarations
25206 437 : __pyx_t_5numpy_uint32_t __pyx_t_1;
25207 437 : int __pyx_lineno = 0;
25208 437 : const char *__pyx_filename = NULL;
25209 437 : int __pyx_clineno = 0;
25210 437 : __Pyx_RefNannySetupContext("__pyx_fuse_0_draw", 1);
25211 :
25212 : /* "scipy/stats/_sobol.pyx":308
25213 : * ):
25214 : * # necessary wrapper to guide Cython for n, num_gen and scale
25215 : * cdef uint_32_64 n_ = n # <<<<<<<<<<<<<<
25216 : * cdef uint_32_64 num_gen_ = num_gen
25217 : * draw(n_, num_gen_, dim, scale, sv, quasi, sample)
25218 : */
25219 437 : __pyx_t_1 = __Pyx_PyInt_As_npy_uint32(__pyx_v_n); if (unlikely((__pyx_t_1 == ((npy_uint32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 308, __pyx_L1_error)
25220 437 : __pyx_v_n_ = __pyx_t_1;
25221 :
25222 : /* "scipy/stats/_sobol.pyx":309
25223 : * # necessary wrapper to guide Cython for n, num_gen and scale
25224 : * cdef uint_32_64 n_ = n
25225 : * cdef uint_32_64 num_gen_ = num_gen # <<<<<<<<<<<<<<
25226 : * draw(n_, num_gen_, dim, scale, sv, quasi, sample)
25227 : *
25228 : */
25229 437 : __pyx_t_1 = __Pyx_PyInt_As_npy_uint32(__pyx_v_num_gen); if (unlikely((__pyx_t_1 == ((npy_uint32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 309, __pyx_L1_error)
25230 437 : __pyx_v_num_gen_ = __pyx_t_1;
25231 :
25232 : /* "scipy/stats/_sobol.pyx":310
25233 : * cdef uint_32_64 n_ = n
25234 : * cdef uint_32_64 num_gen_ = num_gen
25235 : * draw(n_, num_gen_, dim, scale, sv, quasi, sample) # <<<<<<<<<<<<<<
25236 : *
25237 : *
25238 : */
25239 437 : __pyx_fuse_0__pyx_f_5scipy_5stats_6_sobol_draw(__pyx_v_n_, __pyx_v_num_gen_, __pyx_v_dim, __pyx_v_scale, __pyx_v_sv, __pyx_v_quasi, __pyx_v_sample);
25240 :
25241 : /* "scipy/stats/_sobol.pyx":298
25242 : *
25243 : *
25244 : * def _draw( # <<<<<<<<<<<<<<
25245 : * n,
25246 : * num_gen,
25247 : */
25248 :
25249 : /* function exit code */
25250 437 : __pyx_r = Py_None; __Pyx_INCREF(Py_None);
25251 437 : goto __pyx_L0;
25252 0 : __pyx_L1_error:;
25253 0 : __Pyx_AddTraceback("scipy.stats._sobol._draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
25254 0 : __pyx_r = NULL;
25255 437 : __pyx_L0:;
25256 437 : __Pyx_XGIVEREF(__pyx_r);
25257 437 : __Pyx_RefNannyFinishContext();
25258 437 : return __pyx_r;
25259 : }
25260 :
25261 : /* Python wrapper */
25262 : static PyObject *__pyx_fuse_1__pyx_pw_5scipy_5stats_6_sobol_27_draw(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
25263 : static PyMethodDef __pyx_fuse_1__pyx_mdef_5scipy_5stats_6_sobol_27_draw = {"__pyx_fuse_1_draw", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_fuse_1__pyx_pw_5scipy_5stats_6_sobol_27_draw, METH_VARARGS|METH_KEYWORDS, 0};
25264 8 : static PyObject *__pyx_fuse_1__pyx_pw_5scipy_5stats_6_sobol_27_draw(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
25265 8 : PyObject *__pyx_v_n = 0;
25266 8 : PyObject *__pyx_v_num_gen = 0;
25267 8 : int __pyx_v_dim;
25268 8 : __pyx_t_5numpy_float64_t __pyx_v_scale;
25269 8 : __Pyx_memviewslice __pyx_v_sv = { 0, 0, { 0 }, { 0 }, { 0 } };
25270 8 : __Pyx_memviewslice __pyx_v_quasi = { 0, 0, { 0 }, { 0 }, { 0 } };
25271 8 : __Pyx_memviewslice __pyx_v_sample = { 0, 0, { 0 }, { 0 }, { 0 } };
25272 8 : CYTHON_UNUSED Py_ssize_t __pyx_nargs;
25273 8 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
25274 8 : PyObject* values[7] = {0,0,0,0,0,0,0};
25275 8 : int __pyx_lineno = 0;
25276 8 : const char *__pyx_filename = NULL;
25277 8 : int __pyx_clineno = 0;
25278 8 : PyObject *__pyx_r = 0;
25279 : __Pyx_RefNannyDeclarations
25280 8 : __Pyx_RefNannySetupContext("_draw (wrapper)", 0);
25281 : #if CYTHON_ASSUME_SAFE_MACROS
25282 8 : __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
25283 : #else
25284 : __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
25285 : #endif
25286 8 : __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
25287 : {
25288 8 : PyObject **__pyx_pyargnames[] = {&__pyx_n_s_n,&__pyx_n_s_num_gen,&__pyx_n_s_dim,&__pyx_n_s_scale,&__pyx_n_s_sv,&__pyx_n_s_quasi,&__pyx_n_s_sample,0};
25289 8 : if (__pyx_kwds) {
25290 8 : Py_ssize_t kw_args;
25291 8 : switch (__pyx_nargs) {
25292 0 : case 7: values[6] = __Pyx_Arg_VARARGS(__pyx_args, 6);
25293 0 : CYTHON_FALLTHROUGH;
25294 0 : case 6: values[5] = __Pyx_Arg_VARARGS(__pyx_args, 5);
25295 0 : CYTHON_FALLTHROUGH;
25296 0 : case 5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
25297 0 : CYTHON_FALLTHROUGH;
25298 0 : case 4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
25299 0 : CYTHON_FALLTHROUGH;
25300 0 : case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
25301 0 : CYTHON_FALLTHROUGH;
25302 0 : case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
25303 0 : CYTHON_FALLTHROUGH;
25304 0 : case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
25305 8 : CYTHON_FALLTHROUGH;
25306 8 : case 0: break;
25307 0 : default: goto __pyx_L5_argtuple_error;
25308 : }
25309 8 : kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
25310 8 : switch (__pyx_nargs) {
25311 8 : case 0:
25312 8 : if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_n)) != 0)) {
25313 8 : (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
25314 8 : kw_args--;
25315 : }
25316 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 298, __pyx_L3_error)
25317 0 : else goto __pyx_L5_argtuple_error;
25318 8 : CYTHON_FALLTHROUGH;
25319 : case 1:
25320 8 : if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_num_gen)) != 0)) {
25321 8 : (void)__Pyx_Arg_NewRef_VARARGS(values[1]);
25322 8 : kw_args--;
25323 : }
25324 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 298, __pyx_L3_error)
25325 : else {
25326 0 : __Pyx_RaiseArgtupleInvalid("_draw", 1, 7, 7, 1); __PYX_ERR(0, 298, __pyx_L3_error)
25327 : }
25328 8 : CYTHON_FALLTHROUGH;
25329 : case 2:
25330 8 : if (likely((values[2] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_dim)) != 0)) {
25331 8 : (void)__Pyx_Arg_NewRef_VARARGS(values[2]);
25332 8 : kw_args--;
25333 : }
25334 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 298, __pyx_L3_error)
25335 : else {
25336 0 : __Pyx_RaiseArgtupleInvalid("_draw", 1, 7, 7, 2); __PYX_ERR(0, 298, __pyx_L3_error)
25337 : }
25338 8 : CYTHON_FALLTHROUGH;
25339 : case 3:
25340 8 : if (likely((values[3] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_scale)) != 0)) {
25341 8 : (void)__Pyx_Arg_NewRef_VARARGS(values[3]);
25342 8 : kw_args--;
25343 : }
25344 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 298, __pyx_L3_error)
25345 : else {
25346 0 : __Pyx_RaiseArgtupleInvalid("_draw", 1, 7, 7, 3); __PYX_ERR(0, 298, __pyx_L3_error)
25347 : }
25348 8 : CYTHON_FALLTHROUGH;
25349 : case 4:
25350 8 : if (likely((values[4] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_sv)) != 0)) {
25351 8 : (void)__Pyx_Arg_NewRef_VARARGS(values[4]);
25352 8 : kw_args--;
25353 : }
25354 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 298, __pyx_L3_error)
25355 : else {
25356 0 : __Pyx_RaiseArgtupleInvalid("_draw", 1, 7, 7, 4); __PYX_ERR(0, 298, __pyx_L3_error)
25357 : }
25358 8 : CYTHON_FALLTHROUGH;
25359 : case 5:
25360 8 : if (likely((values[5] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_quasi)) != 0)) {
25361 8 : (void)__Pyx_Arg_NewRef_VARARGS(values[5]);
25362 8 : kw_args--;
25363 : }
25364 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 298, __pyx_L3_error)
25365 : else {
25366 0 : __Pyx_RaiseArgtupleInvalid("_draw", 1, 7, 7, 5); __PYX_ERR(0, 298, __pyx_L3_error)
25367 : }
25368 8 : CYTHON_FALLTHROUGH;
25369 : case 6:
25370 8 : if (likely((values[6] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_sample)) != 0)) {
25371 8 : (void)__Pyx_Arg_NewRef_VARARGS(values[6]);
25372 8 : kw_args--;
25373 : }
25374 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 298, __pyx_L3_error)
25375 : else {
25376 0 : __Pyx_RaiseArgtupleInvalid("_draw", 1, 7, 7, 6); __PYX_ERR(0, 298, __pyx_L3_error)
25377 : }
25378 : }
25379 8 : if (unlikely(kw_args > 0)) {
25380 0 : const Py_ssize_t kwd_pos_args = __pyx_nargs;
25381 0 : if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_draw") < 0)) __PYX_ERR(0, 298, __pyx_L3_error)
25382 : }
25383 0 : } else if (unlikely(__pyx_nargs != 7)) {
25384 0 : goto __pyx_L5_argtuple_error;
25385 : } else {
25386 0 : values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
25387 0 : values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
25388 0 : values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
25389 0 : values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
25390 0 : values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
25391 0 : values[5] = __Pyx_Arg_VARARGS(__pyx_args, 5);
25392 0 : values[6] = __Pyx_Arg_VARARGS(__pyx_args, 6);
25393 : }
25394 8 : __pyx_v_n = values[0];
25395 8 : __pyx_v_num_gen = values[1];
25396 8 : __pyx_v_dim = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_dim == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 301, __pyx_L3_error)
25397 8 : __pyx_v_scale = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_scale == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 302, __pyx_L3_error)
25398 8 : __pyx_v_sv = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_5numpy_uint64_t__const__(values[4], 0); if (unlikely(!__pyx_v_sv.memview)) __PYX_ERR(0, 303, __pyx_L3_error)
25399 8 : __pyx_v_quasi = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_uint64_t(values[5], PyBUF_WRITABLE); if (unlikely(!__pyx_v_quasi.memview)) __PYX_ERR(0, 304, __pyx_L3_error)
25400 8 : __pyx_v_sample = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_5numpy_float64_t(values[6], PyBUF_WRITABLE); if (unlikely(!__pyx_v_sample.memview)) __PYX_ERR(0, 305, __pyx_L3_error)
25401 : }
25402 8 : goto __pyx_L6_skip;
25403 0 : __pyx_L5_argtuple_error:;
25404 0 : __Pyx_RaiseArgtupleInvalid("_draw", 1, 7, 7, __pyx_nargs); __PYX_ERR(0, 298, __pyx_L3_error)
25405 8 : __pyx_L6_skip:;
25406 8 : goto __pyx_L4_argument_unpacking_done;
25407 0 : __pyx_L3_error:;
25408 : {
25409 0 : Py_ssize_t __pyx_temp;
25410 0 : for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
25411 : __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
25412 : }
25413 : }
25414 0 : __PYX_XCLEAR_MEMVIEW(&__pyx_v_sv, 1);
25415 0 : __PYX_XCLEAR_MEMVIEW(&__pyx_v_quasi, 1);
25416 0 : __PYX_XCLEAR_MEMVIEW(&__pyx_v_sample, 1);
25417 0 : __Pyx_AddTraceback("scipy.stats._sobol._draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
25418 0 : __Pyx_RefNannyFinishContext();
25419 0 : return NULL;
25420 8 : __pyx_L4_argument_unpacking_done:;
25421 8 : __pyx_r = __pyx_pf_5scipy_5stats_6_sobol_26_draw(__pyx_self, __pyx_v_n, __pyx_v_num_gen, __pyx_v_dim, __pyx_v_scale, __pyx_v_sv, __pyx_v_quasi, __pyx_v_sample);
25422 :
25423 : /* function exit code */
25424 8 : __PYX_XCLEAR_MEMVIEW(&__pyx_v_sv, 1);
25425 8 : __PYX_XCLEAR_MEMVIEW(&__pyx_v_quasi, 1);
25426 8 : __PYX_XCLEAR_MEMVIEW(&__pyx_v_sample, 1);
25427 : {
25428 8 : Py_ssize_t __pyx_temp;
25429 8 : for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
25430 : __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
25431 : }
25432 : }
25433 : __Pyx_RefNannyFinishContext();
25434 : return __pyx_r;
25435 : }
25436 :
25437 8 : static PyObject *__pyx_pf_5scipy_5stats_6_sobol_26_draw(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n, PyObject *__pyx_v_num_gen, int __pyx_v_dim, __pyx_t_5numpy_float64_t __pyx_v_scale, __Pyx_memviewslice __pyx_v_sv, __Pyx_memviewslice __pyx_v_quasi, __Pyx_memviewslice __pyx_v_sample) {
25438 8 : __pyx_t_5numpy_uint64_t __pyx_v_n_;
25439 8 : __pyx_t_5numpy_uint64_t __pyx_v_num_gen_;
25440 8 : PyObject *__pyx_r = NULL;
25441 : __Pyx_RefNannyDeclarations
25442 8 : __pyx_t_5numpy_uint64_t __pyx_t_1;
25443 8 : int __pyx_lineno = 0;
25444 8 : const char *__pyx_filename = NULL;
25445 8 : int __pyx_clineno = 0;
25446 8 : __Pyx_RefNannySetupContext("__pyx_fuse_1_draw", 1);
25447 :
25448 : /* "scipy/stats/_sobol.pyx":308
25449 : * ):
25450 : * # necessary wrapper to guide Cython for n, num_gen and scale
25451 : * cdef uint_32_64 n_ = n # <<<<<<<<<<<<<<
25452 : * cdef uint_32_64 num_gen_ = num_gen
25453 : * draw(n_, num_gen_, dim, scale, sv, quasi, sample)
25454 : */
25455 8 : __pyx_t_1 = __Pyx_PyInt_As_npy_uint64(__pyx_v_n); if (unlikely((__pyx_t_1 == ((npy_uint64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 308, __pyx_L1_error)
25456 8 : __pyx_v_n_ = __pyx_t_1;
25457 :
25458 : /* "scipy/stats/_sobol.pyx":309
25459 : * # necessary wrapper to guide Cython for n, num_gen and scale
25460 : * cdef uint_32_64 n_ = n
25461 : * cdef uint_32_64 num_gen_ = num_gen # <<<<<<<<<<<<<<
25462 : * draw(n_, num_gen_, dim, scale, sv, quasi, sample)
25463 : *
25464 : */
25465 8 : __pyx_t_1 = __Pyx_PyInt_As_npy_uint64(__pyx_v_num_gen); if (unlikely((__pyx_t_1 == ((npy_uint64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 309, __pyx_L1_error)
25466 8 : __pyx_v_num_gen_ = __pyx_t_1;
25467 :
25468 : /* "scipy/stats/_sobol.pyx":310
25469 : * cdef uint_32_64 n_ = n
25470 : * cdef uint_32_64 num_gen_ = num_gen
25471 : * draw(n_, num_gen_, dim, scale, sv, quasi, sample) # <<<<<<<<<<<<<<
25472 : *
25473 : *
25474 : */
25475 8 : __pyx_fuse_1__pyx_f_5scipy_5stats_6_sobol_draw(__pyx_v_n_, __pyx_v_num_gen_, __pyx_v_dim, __pyx_v_scale, __pyx_v_sv, __pyx_v_quasi, __pyx_v_sample);
25476 :
25477 : /* "scipy/stats/_sobol.pyx":298
25478 : *
25479 : *
25480 : * def _draw( # <<<<<<<<<<<<<<
25481 : * n,
25482 : * num_gen,
25483 : */
25484 :
25485 : /* function exit code */
25486 8 : __pyx_r = Py_None; __Pyx_INCREF(Py_None);
25487 8 : goto __pyx_L0;
25488 0 : __pyx_L1_error:;
25489 0 : __Pyx_AddTraceback("scipy.stats._sobol._draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
25490 0 : __pyx_r = NULL;
25491 8 : __pyx_L0:;
25492 8 : __Pyx_XGIVEREF(__pyx_r);
25493 8 : __Pyx_RefNannyFinishContext();
25494 8 : return __pyx_r;
25495 : }
25496 :
25497 : /* "scipy/stats/_sobol.pyx":315
25498 : * @cython.boundscheck(False)
25499 : * @cython.wraparound(False)
25500 : * cdef void draw( # <<<<<<<<<<<<<<
25501 : * const uint_32_64 n,
25502 : * const uint_32_64 num_gen,
25503 : */
25504 :
25505 437 : static void __pyx_fuse_0__pyx_f_5scipy_5stats_6_sobol_draw(__pyx_t_5numpy_uint32_t const __pyx_v_n, __pyx_t_5numpy_uint32_t const __pyx_v_num_gen, int const __pyx_v_dim, __pyx_t_5numpy_float64_t const __pyx_v_scale, __Pyx_memviewslice __pyx_v_sv, __Pyx_memviewslice __pyx_v_quasi, __Pyx_memviewslice __pyx_v_sample) {
25506 437 : int __pyx_v_j;
25507 437 : int __pyx_v_l;
25508 437 : __pyx_t_5numpy_uint32_t __pyx_v_num_gen_loc;
25509 437 : __pyx_t_5numpy_uint32_t __pyx_v_i;
25510 437 : __pyx_t_5numpy_uint32_t __pyx_v_qtmp;
25511 437 : __pyx_t_5numpy_uint32_t __pyx_t_1;
25512 437 : __pyx_t_5numpy_uint32_t __pyx_t_2;
25513 437 : __pyx_t_5numpy_uint32_t __pyx_t_3;
25514 437 : int __pyx_t_4;
25515 437 : int __pyx_t_5;
25516 437 : int __pyx_t_6;
25517 437 : Py_ssize_t __pyx_t_7;
25518 437 : Py_ssize_t __pyx_t_8;
25519 437 : Py_ssize_t __pyx_t_9;
25520 437 : size_t __pyx_t_10;
25521 :
25522 : /* "scipy/stats/_sobol.pyx":325
25523 : * ) noexcept nogil:
25524 : * cdef int j, l
25525 : * cdef uint_32_64 num_gen_loc = num_gen # <<<<<<<<<<<<<<
25526 : * cdef uint_32_64 i, qtmp
25527 : *
25528 : */
25529 437 : __pyx_v_num_gen_loc = __pyx_v_num_gen;
25530 :
25531 : /* "scipy/stats/_sobol.pyx":328
25532 : * cdef uint_32_64 i, qtmp
25533 : *
25534 : * for i in range(n): # <<<<<<<<<<<<<<
25535 : * l = low_0_bit(num_gen_loc)
25536 : * for j in range(dim):
25537 : */
25538 437 : __pyx_t_1 = __pyx_v_n;
25539 437 : __pyx_t_2 = __pyx_t_1;
25540 249711 : for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
25541 : __pyx_v_i = __pyx_t_3;
25542 :
25543 : /* "scipy/stats/_sobol.pyx":329
25544 : *
25545 : * for i in range(n):
25546 : * l = low_0_bit(num_gen_loc) # <<<<<<<<<<<<<<
25547 : * for j in range(dim):
25548 : * qtmp = quasi[j] ^ sv[j, l - 1]
25549 : */
25550 249274 : __pyx_v_l = __pyx_fuse_0__pyx_f_5scipy_5stats_6_sobol_low_0_bit(__pyx_v_num_gen_loc);
25551 :
25552 : /* "scipy/stats/_sobol.pyx":330
25553 : * for i in range(n):
25554 : * l = low_0_bit(num_gen_loc)
25555 : * for j in range(dim): # <<<<<<<<<<<<<<
25556 : * qtmp = quasi[j] ^ sv[j, l - 1]
25557 : * quasi[j] = qtmp
25558 : */
25559 249274 : __pyx_t_4 = __pyx_v_dim;
25560 249274 : __pyx_t_5 = __pyx_t_4;
25561 888672 : for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
25562 639398 : __pyx_v_j = __pyx_t_6;
25563 :
25564 : /* "scipy/stats/_sobol.pyx":331
25565 : * l = low_0_bit(num_gen_loc)
25566 : * for j in range(dim):
25567 : * qtmp = quasi[j] ^ sv[j, l - 1] # <<<<<<<<<<<<<<
25568 : * quasi[j] = qtmp
25569 : * sample[i, j] = qtmp * scale
25570 : */
25571 639398 : __pyx_t_7 = __pyx_v_j;
25572 639398 : __pyx_t_8 = __pyx_v_j;
25573 639398 : __pyx_t_9 = (__pyx_v_l - 1);
25574 639398 : __pyx_v_qtmp = ((*((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ ((char *) (((__pyx_t_5numpy_uint32_t *) __pyx_v_quasi.data) + __pyx_t_7)) ))) ^ (*((__pyx_t_5numpy_uint32_t const *) ( /* dim=1 */ ((char *) (((__pyx_t_5numpy_uint32_t const *) ( /* dim=0 */ (__pyx_v_sv.data + __pyx_t_8 * __pyx_v_sv.strides[0]) )) + __pyx_t_9)) ))));
25575 :
25576 : /* "scipy/stats/_sobol.pyx":332
25577 : * for j in range(dim):
25578 : * qtmp = quasi[j] ^ sv[j, l - 1]
25579 : * quasi[j] = qtmp # <<<<<<<<<<<<<<
25580 : * sample[i, j] = qtmp * scale
25581 : * num_gen_loc += 1
25582 : */
25583 639398 : __pyx_t_9 = __pyx_v_j;
25584 639398 : *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ ((char *) (((__pyx_t_5numpy_uint32_t *) __pyx_v_quasi.data) + __pyx_t_9)) )) = __pyx_v_qtmp;
25585 :
25586 : /* "scipy/stats/_sobol.pyx":333
25587 : * qtmp = quasi[j] ^ sv[j, l - 1]
25588 : * quasi[j] = qtmp
25589 : * sample[i, j] = qtmp * scale # <<<<<<<<<<<<<<
25590 : * num_gen_loc += 1
25591 : *
25592 : */
25593 639398 : __pyx_t_10 = __pyx_v_i;
25594 639398 : __pyx_t_9 = __pyx_v_j;
25595 639398 : *((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ ((char *) (((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_sample.data + __pyx_t_10 * __pyx_v_sample.strides[0]) )) + __pyx_t_9)) )) = (__pyx_v_qtmp * __pyx_v_scale);
25596 : }
25597 :
25598 : /* "scipy/stats/_sobol.pyx":334
25599 : * quasi[j] = qtmp
25600 : * sample[i, j] = qtmp * scale
25601 : * num_gen_loc += 1 # <<<<<<<<<<<<<<
25602 : *
25603 : *
25604 : */
25605 249274 : __pyx_v_num_gen_loc = (__pyx_v_num_gen_loc + 1);
25606 : }
25607 :
25608 : /* "scipy/stats/_sobol.pyx":315
25609 : * @cython.boundscheck(False)
25610 : * @cython.wraparound(False)
25611 : * cdef void draw( # <<<<<<<<<<<<<<
25612 : * const uint_32_64 n,
25613 : * const uint_32_64 num_gen,
25614 : */
25615 :
25616 : /* function exit code */
25617 437 : }
25618 :
25619 8 : static void __pyx_fuse_1__pyx_f_5scipy_5stats_6_sobol_draw(__pyx_t_5numpy_uint64_t const __pyx_v_n, __pyx_t_5numpy_uint64_t const __pyx_v_num_gen, int const __pyx_v_dim, __pyx_t_5numpy_float64_t const __pyx_v_scale, __Pyx_memviewslice __pyx_v_sv, __Pyx_memviewslice __pyx_v_quasi, __Pyx_memviewslice __pyx_v_sample) {
25620 8 : int __pyx_v_j;
25621 8 : int __pyx_v_l;
25622 8 : __pyx_t_5numpy_uint64_t __pyx_v_num_gen_loc;
25623 8 : __pyx_t_5numpy_uint64_t __pyx_v_i;
25624 8 : __pyx_t_5numpy_uint64_t __pyx_v_qtmp;
25625 8 : __pyx_t_5numpy_uint64_t __pyx_t_1;
25626 8 : __pyx_t_5numpy_uint64_t __pyx_t_2;
25627 8 : __pyx_t_5numpy_uint64_t __pyx_t_3;
25628 8 : int __pyx_t_4;
25629 8 : int __pyx_t_5;
25630 8 : int __pyx_t_6;
25631 8 : Py_ssize_t __pyx_t_7;
25632 8 : Py_ssize_t __pyx_t_8;
25633 8 : Py_ssize_t __pyx_t_9;
25634 8 : __pyx_t_5numpy_uint64_t __pyx_t_10;
25635 :
25636 : /* "scipy/stats/_sobol.pyx":325
25637 : * ) noexcept nogil:
25638 : * cdef int j, l
25639 : * cdef uint_32_64 num_gen_loc = num_gen # <<<<<<<<<<<<<<
25640 : * cdef uint_32_64 i, qtmp
25641 : *
25642 : */
25643 8 : __pyx_v_num_gen_loc = __pyx_v_num_gen;
25644 :
25645 : /* "scipy/stats/_sobol.pyx":328
25646 : * cdef uint_32_64 i, qtmp
25647 : *
25648 : * for i in range(n): # <<<<<<<<<<<<<<
25649 : * l = low_0_bit(num_gen_loc)
25650 : * for j in range(dim):
25651 : */
25652 8 : __pyx_t_1 = __pyx_v_n;
25653 8 : __pyx_t_2 = __pyx_t_1;
25654 540690 : for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
25655 : __pyx_v_i = __pyx_t_3;
25656 :
25657 : /* "scipy/stats/_sobol.pyx":329
25658 : *
25659 : * for i in range(n):
25660 : * l = low_0_bit(num_gen_loc) # <<<<<<<<<<<<<<
25661 : * for j in range(dim):
25662 : * qtmp = quasi[j] ^ sv[j, l - 1]
25663 : */
25664 540682 : __pyx_v_l = __pyx_fuse_1__pyx_f_5scipy_5stats_6_sobol_low_0_bit(__pyx_v_num_gen_loc);
25665 :
25666 : /* "scipy/stats/_sobol.pyx":330
25667 : * for i in range(n):
25668 : * l = low_0_bit(num_gen_loc)
25669 : * for j in range(dim): # <<<<<<<<<<<<<<
25670 : * qtmp = quasi[j] ^ sv[j, l - 1]
25671 : * quasi[j] = qtmp
25672 : */
25673 540682 : __pyx_t_4 = __pyx_v_dim;
25674 540682 : __pyx_t_5 = __pyx_t_4;
25675 3784742 : for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
25676 3244060 : __pyx_v_j = __pyx_t_6;
25677 :
25678 : /* "scipy/stats/_sobol.pyx":331
25679 : * l = low_0_bit(num_gen_loc)
25680 : * for j in range(dim):
25681 : * qtmp = quasi[j] ^ sv[j, l - 1] # <<<<<<<<<<<<<<
25682 : * quasi[j] = qtmp
25683 : * sample[i, j] = qtmp * scale
25684 : */
25685 3244060 : __pyx_t_7 = __pyx_v_j;
25686 3244060 : __pyx_t_8 = __pyx_v_j;
25687 3244060 : __pyx_t_9 = (__pyx_v_l - 1);
25688 3244060 : __pyx_v_qtmp = ((*((__pyx_t_5numpy_uint64_t *) ( /* dim=0 */ ((char *) (((__pyx_t_5numpy_uint64_t *) __pyx_v_quasi.data) + __pyx_t_7)) ))) ^ (*((__pyx_t_5numpy_uint64_t const *) ( /* dim=1 */ ((char *) (((__pyx_t_5numpy_uint64_t const *) ( /* dim=0 */ (__pyx_v_sv.data + __pyx_t_8 * __pyx_v_sv.strides[0]) )) + __pyx_t_9)) ))));
25689 :
25690 : /* "scipy/stats/_sobol.pyx":332
25691 : * for j in range(dim):
25692 : * qtmp = quasi[j] ^ sv[j, l - 1]
25693 : * quasi[j] = qtmp # <<<<<<<<<<<<<<
25694 : * sample[i, j] = qtmp * scale
25695 : * num_gen_loc += 1
25696 : */
25697 3244060 : __pyx_t_9 = __pyx_v_j;
25698 3244060 : *((__pyx_t_5numpy_uint64_t *) ( /* dim=0 */ ((char *) (((__pyx_t_5numpy_uint64_t *) __pyx_v_quasi.data) + __pyx_t_9)) )) = __pyx_v_qtmp;
25699 :
25700 : /* "scipy/stats/_sobol.pyx":333
25701 : * qtmp = quasi[j] ^ sv[j, l - 1]
25702 : * quasi[j] = qtmp
25703 : * sample[i, j] = qtmp * scale # <<<<<<<<<<<<<<
25704 : * num_gen_loc += 1
25705 : *
25706 : */
25707 3244060 : __pyx_t_10 = __pyx_v_i;
25708 3244060 : __pyx_t_9 = __pyx_v_j;
25709 3244060 : *((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ ((char *) (((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_sample.data + __pyx_t_10 * __pyx_v_sample.strides[0]) )) + __pyx_t_9)) )) = (__pyx_v_qtmp * __pyx_v_scale);
25710 : }
25711 :
25712 : /* "scipy/stats/_sobol.pyx":334
25713 : * quasi[j] = qtmp
25714 : * sample[i, j] = qtmp * scale
25715 : * num_gen_loc += 1 # <<<<<<<<<<<<<<
25716 : *
25717 : *
25718 : */
25719 540682 : __pyx_v_num_gen_loc = (__pyx_v_num_gen_loc + 1);
25720 : }
25721 :
25722 : /* "scipy/stats/_sobol.pyx":315
25723 : * @cython.boundscheck(False)
25724 : * @cython.wraparound(False)
25725 : * cdef void draw( # <<<<<<<<<<<<<<
25726 : * const uint_32_64 n,
25727 : * const uint_32_64 num_gen,
25728 : */
25729 :
25730 : /* function exit code */
25731 8 : }
25732 :
25733 : /* "scipy/stats/_sobol.pyx":339
25734 : * @cython.boundscheck(False)
25735 : * @cython.wraparound(False)
25736 : * cpdef void _fast_forward(const uint_32_64 n, # <<<<<<<<<<<<<<
25737 : * const uint_32_64 num_gen,
25738 : * const int dim,
25739 : */
25740 :
25741 : /* Python wrapper */
25742 : static PyObject *__pyx_pw_5scipy_5stats_6_sobol_9_fast_forward(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
25743 : static PyMethodDef __pyx_mdef_5scipy_5stats_6_sobol_9_fast_forward = {"_fast_forward", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5scipy_5stats_6_sobol_9_fast_forward, METH_VARARGS|METH_KEYWORDS, 0};
25744 10 : static PyObject *__pyx_pw_5scipy_5stats_6_sobol_9_fast_forward(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
25745 10 : PyObject *__pyx_v_signatures = 0;
25746 10 : PyObject *__pyx_v_args = 0;
25747 10 : PyObject *__pyx_v_kwargs = 0;
25748 10 : CYTHON_UNUSED PyObject *__pyx_v_defaults = 0;
25749 10 : PyObject *__pyx_v__fused_sigindex = 0;
25750 10 : CYTHON_UNUSED Py_ssize_t __pyx_nargs;
25751 10 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
25752 10 : PyObject* values[5] = {0,0,0,0,0};
25753 10 : int __pyx_lineno = 0;
25754 10 : const char *__pyx_filename = NULL;
25755 10 : int __pyx_clineno = 0;
25756 10 : PyObject *__pyx_r = 0;
25757 : __Pyx_RefNannyDeclarations
25758 10 : __Pyx_RefNannySetupContext("__pyx_fused_cpdef (wrapper)", 0);
25759 : #if CYTHON_ASSUME_SAFE_MACROS
25760 10 : __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
25761 : #else
25762 : __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
25763 : #endif
25764 10 : __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
25765 : {
25766 10 : PyObject **__pyx_pyargnames[] = {&__pyx_n_s_signatures,&__pyx_n_s_args,&__pyx_n_s_kwargs,&__pyx_n_s_defaults,&__pyx_n_s_fused_sigindex,0};
25767 10 : __pyx_defaults2 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_self);
25768 10 : values[4] = __Pyx_Arg_NewRef_VARARGS(__pyx_dynamic_args->__pyx_arg__fused_sigindex);
25769 10 : if (__pyx_kwds) {
25770 0 : Py_ssize_t kw_args;
25771 0 : switch (__pyx_nargs) {
25772 0 : case 5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
25773 0 : CYTHON_FALLTHROUGH;
25774 0 : case 4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
25775 0 : CYTHON_FALLTHROUGH;
25776 0 : case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
25777 0 : CYTHON_FALLTHROUGH;
25778 0 : case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
25779 0 : CYTHON_FALLTHROUGH;
25780 0 : case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
25781 0 : CYTHON_FALLTHROUGH;
25782 0 : case 0: break;
25783 0 : default: goto __pyx_L5_argtuple_error;
25784 : }
25785 0 : kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
25786 0 : switch (__pyx_nargs) {
25787 0 : case 0:
25788 0 : if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_signatures)) != 0)) {
25789 0 : (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
25790 0 : kw_args--;
25791 : }
25792 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 339, __pyx_L3_error)
25793 0 : else goto __pyx_L5_argtuple_error;
25794 0 : CYTHON_FALLTHROUGH;
25795 : case 1:
25796 0 : if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_args)) != 0)) {
25797 0 : (void)__Pyx_Arg_NewRef_VARARGS(values[1]);
25798 0 : kw_args--;
25799 : }
25800 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 339, __pyx_L3_error)
25801 : else {
25802 0 : __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 1); __PYX_ERR(0, 339, __pyx_L3_error)
25803 : }
25804 0 : CYTHON_FALLTHROUGH;
25805 : case 2:
25806 0 : if (likely((values[2] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_kwargs)) != 0)) {
25807 0 : (void)__Pyx_Arg_NewRef_VARARGS(values[2]);
25808 0 : kw_args--;
25809 : }
25810 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 339, __pyx_L3_error)
25811 : else {
25812 0 : __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 2); __PYX_ERR(0, 339, __pyx_L3_error)
25813 : }
25814 0 : CYTHON_FALLTHROUGH;
25815 : case 3:
25816 0 : if (likely((values[3] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_defaults)) != 0)) {
25817 0 : (void)__Pyx_Arg_NewRef_VARARGS(values[3]);
25818 0 : kw_args--;
25819 : }
25820 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 339, __pyx_L3_error)
25821 : else {
25822 0 : __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 3); __PYX_ERR(0, 339, __pyx_L3_error)
25823 : }
25824 0 : CYTHON_FALLTHROUGH;
25825 : case 4:
25826 0 : if (kw_args > 0) {
25827 0 : PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fused_sigindex);
25828 0 : if (value) { values[4] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
25829 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 339, __pyx_L3_error)
25830 : }
25831 : }
25832 0 : if (unlikely(kw_args > 0)) {
25833 0 : const Py_ssize_t kwd_pos_args = __pyx_nargs;
25834 0 : if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fused_cpdef") < 0)) __PYX_ERR(0, 339, __pyx_L3_error)
25835 : }
25836 : } else {
25837 10 : switch (__pyx_nargs) {
25838 0 : case 5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
25839 10 : CYTHON_FALLTHROUGH;
25840 10 : case 4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
25841 10 : values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
25842 10 : values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
25843 10 : values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
25844 10 : break;
25845 0 : default: goto __pyx_L5_argtuple_error;
25846 : }
25847 : }
25848 10 : __pyx_v_signatures = values[0];
25849 10 : __pyx_v_args = values[1];
25850 10 : __pyx_v_kwargs = values[2];
25851 10 : __pyx_v_defaults = values[3];
25852 10 : __pyx_v__fused_sigindex = values[4];
25853 : }
25854 10 : goto __pyx_L6_skip;
25855 0 : __pyx_L5_argtuple_error:;
25856 0 : __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 339, __pyx_L3_error)
25857 10 : __pyx_L6_skip:;
25858 10 : goto __pyx_L4_argument_unpacking_done;
25859 0 : __pyx_L3_error:;
25860 : {
25861 0 : Py_ssize_t __pyx_temp;
25862 0 : for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
25863 : __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
25864 : }
25865 : }
25866 0 : __Pyx_AddTraceback("scipy.stats._sobol.__pyx_fused_cpdef", __pyx_clineno, __pyx_lineno, __pyx_filename);
25867 0 : __Pyx_RefNannyFinishContext();
25868 0 : return NULL;
25869 10 : __pyx_L4_argument_unpacking_done:;
25870 10 : __pyx_r = __pyx_pf_5scipy_5stats_6_sobol_8_fast_forward(__pyx_self, __pyx_v_signatures, __pyx_v_args, __pyx_v_kwargs, __pyx_v_defaults, __pyx_v__fused_sigindex);
25871 :
25872 : /* function exit code */
25873 : {
25874 10 : Py_ssize_t __pyx_temp;
25875 10 : for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
25876 : __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
25877 : }
25878 : }
25879 : __Pyx_RefNannyFinishContext();
25880 : return __pyx_r;
25881 : }
25882 :
25883 10 : static PyObject *__pyx_pf_5scipy_5stats_6_sobol_8_fast_forward(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_signatures, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, CYTHON_UNUSED PyObject *__pyx_v_defaults, PyObject *__pyx_v__fused_sigindex) {
25884 10 : PyObject *__pyx_v_search_list = 0;
25885 10 : PyObject *__pyx_v_sigindex_node = 0;
25886 10 : PyObject *__pyx_v_dest_sig = NULL;
25887 10 : PyObject *__pyx_v_arg = NULL;
25888 10 : PyObject *__pyx_v_sig = NULL;
25889 10 : PyObject *__pyx_v_sig_series = NULL;
25890 10 : PyObject *__pyx_v_last_type = NULL;
25891 10 : PyObject *__pyx_v_sig_type = NULL;
25892 10 : PyObject *__pyx_v_sigindex_matches = NULL;
25893 10 : PyObject *__pyx_v_sigindex_candidates = NULL;
25894 10 : PyObject *__pyx_v_dst_type = NULL;
25895 10 : PyObject *__pyx_v_found_matches = NULL;
25896 10 : PyObject *__pyx_v_found_candidates = NULL;
25897 10 : PyObject *__pyx_v_sn = NULL;
25898 10 : PyObject *__pyx_v_type_match = NULL;
25899 10 : PyObject *__pyx_v_candidates = NULL;
25900 10 : PyObject *__pyx_r = NULL;
25901 : __Pyx_RefNannyDeclarations
25902 10 : PyObject *__pyx_t_1 = NULL;
25903 10 : int __pyx_t_2;
25904 10 : int __pyx_t_3;
25905 10 : int __pyx_t_4;
25906 10 : Py_ssize_t __pyx_t_5;
25907 10 : PyObject *__pyx_t_6 = NULL;
25908 10 : Py_ssize_t __pyx_t_7;
25909 10 : int __pyx_t_8;
25910 10 : int __pyx_t_9;
25911 10 : PyObject *__pyx_t_10 = NULL;
25912 10 : PyObject *__pyx_t_11 = NULL;
25913 10 : PyObject *__pyx_t_12 = NULL;
25914 10 : unsigned int __pyx_t_13;
25915 10 : Py_ssize_t __pyx_t_14;
25916 10 : int __pyx_t_15;
25917 10 : int __pyx_lineno = 0;
25918 10 : const char *__pyx_filename = NULL;
25919 10 : int __pyx_clineno = 0;
25920 10 : __Pyx_RefNannySetupContext("_fast_forward", 0);
25921 10 : __Pyx_INCREF(__pyx_v_kwargs);
25922 10 : __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 339, __pyx_L1_error)
25923 10 : __Pyx_GOTREF(__pyx_t_1);
25924 10 : __Pyx_INCREF(Py_None);
25925 10 : __Pyx_GIVEREF(Py_None);
25926 10 : if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, Py_None)) __PYX_ERR(0, 339, __pyx_L1_error);
25927 10 : __pyx_v_dest_sig = ((PyObject*)__pyx_t_1);
25928 10 : __pyx_t_1 = 0;
25929 10 : __pyx_t_3 = (__pyx_v_kwargs != Py_None);
25930 10 : if (__pyx_t_3) {
25931 10 : } else {
25932 0 : __pyx_t_2 = __pyx_t_3;
25933 0 : goto __pyx_L4_bool_binop_done;
25934 : }
25935 10 : __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 339, __pyx_L1_error)
25936 10 : __pyx_t_4 = (!__pyx_t_3);
25937 10 : __pyx_t_2 = __pyx_t_4;
25938 10 : __pyx_L4_bool_binop_done:;
25939 10 : if (__pyx_t_2) {
25940 0 : __Pyx_INCREF(Py_None);
25941 0 : __Pyx_DECREF_SET(__pyx_v_kwargs, Py_None);
25942 : }
25943 10 : if (unlikely(__pyx_v_args == Py_None)) {
25944 0 : PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
25945 0 : __PYX_ERR(0, 339, __pyx_L1_error)
25946 : }
25947 10 : __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 339, __pyx_L1_error)
25948 10 : __pyx_t_2 = (0 < __pyx_t_5);
25949 10 : if (__pyx_t_2) {
25950 0 : if (unlikely(__pyx_v_args == Py_None)) {
25951 : PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
25952 : __PYX_ERR(0, 339, __pyx_L1_error)
25953 : }
25954 0 : __pyx_t_1 = PyTuple_GET_ITEM(((PyObject*)__pyx_v_args), 0);
25955 0 : __Pyx_INCREF(__pyx_t_1);
25956 0 : __pyx_v_arg = __pyx_t_1;
25957 0 : __pyx_t_1 = 0;
25958 0 : goto __pyx_L6;
25959 : }
25960 10 : __pyx_t_4 = (__pyx_v_kwargs != Py_None);
25961 10 : if (__pyx_t_4) {
25962 10 : } else {
25963 0 : __pyx_t_2 = __pyx_t_4;
25964 0 : goto __pyx_L7_bool_binop_done;
25965 : }
25966 10 : if (unlikely(__pyx_v_kwargs == Py_None)) {
25967 : PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
25968 : __PYX_ERR(0, 339, __pyx_L1_error)
25969 : }
25970 20 : __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_n, ((PyObject*)__pyx_v_kwargs), Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 339, __pyx_L1_error)
25971 : __pyx_t_2 = __pyx_t_4;
25972 10 : __pyx_L7_bool_binop_done:;
25973 10 : if (likely(__pyx_t_2)) {
25974 10 : if (unlikely(__pyx_v_kwargs == Py_None)) {
25975 0 : PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
25976 0 : __PYX_ERR(0, 339, __pyx_L1_error)
25977 : }
25978 10 : __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_kwargs), __pyx_n_s_n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 339, __pyx_L1_error)
25979 10 : __Pyx_GOTREF(__pyx_t_1);
25980 10 : __pyx_v_arg = __pyx_t_1;
25981 10 : __pyx_t_1 = 0;
25982 10 : goto __pyx_L6;
25983 : }
25984 : /*else*/ {
25985 0 : if (unlikely(__pyx_v_args == Py_None)) {
25986 : PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
25987 : __PYX_ERR(0, 339, __pyx_L1_error)
25988 : }
25989 0 : __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 339, __pyx_L1_error)
25990 0 : __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 339, __pyx_L1_error)
25991 0 : __Pyx_GOTREF(__pyx_t_1);
25992 0 : __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 339, __pyx_L1_error)
25993 0 : __Pyx_GOTREF(__pyx_t_6);
25994 0 : __Pyx_INCREF(__pyx_int_5);
25995 0 : __Pyx_GIVEREF(__pyx_int_5);
25996 0 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_5)) __PYX_ERR(0, 339, __pyx_L1_error);
25997 0 : __Pyx_INCREF(__pyx_n_s_s);
25998 0 : __Pyx_GIVEREF(__pyx_n_s_s);
25999 0 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_s)) __PYX_ERR(0, 339, __pyx_L1_error);
26000 0 : __Pyx_GIVEREF(__pyx_t_1);
26001 0 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_1)) __PYX_ERR(0, 339, __pyx_L1_error);
26002 0 : __pyx_t_1 = 0;
26003 0 : __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Expected_at_least_d_argument_s_g, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 339, __pyx_L1_error)
26004 0 : __Pyx_GOTREF(__pyx_t_1);
26005 0 : __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
26006 0 : __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 339, __pyx_L1_error)
26007 0 : __Pyx_GOTREF(__pyx_t_6);
26008 0 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26009 0 : __Pyx_Raise(__pyx_t_6, 0, 0, 0);
26010 0 : __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
26011 0 : __PYX_ERR(0, 339, __pyx_L1_error)
26012 : }
26013 10 : __pyx_L6:;
26014 10 : while (1) {
26015 10 : __pyx_t_4 = PyInt_Check(__pyx_v_arg);
26016 10 : if (!__pyx_t_4) {
26017 : } else {
26018 : __pyx_t_2 = __pyx_t_4;
26019 : goto __pyx_L12_bool_binop_done;
26020 : }
26021 10 : __pyx_t_4 = PyLong_Check(__pyx_v_arg);
26022 : __pyx_t_2 = __pyx_t_4;
26023 10 : __pyx_L12_bool_binop_done:;
26024 10 : if (__pyx_t_2) {
26025 10 : if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_uint32_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 339, __pyx_L1_error)
26026 10 : goto __pyx_L10_break;
26027 : }
26028 0 : if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 339, __pyx_L1_error)
26029 0 : goto __pyx_L10_break;
26030 : }
26031 10 : __pyx_L10_break:;
26032 10 : __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v__fused_sigindex); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 339, __pyx_L1_error)
26033 10 : __pyx_t_4 = (!__pyx_t_2);
26034 10 : if (__pyx_t_4) {
26035 1 : __pyx_t_5 = 0;
26036 1 : if (unlikely(__pyx_v_signatures == Py_None)) {
26037 0 : PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
26038 0 : __PYX_ERR(0, 339, __pyx_L1_error)
26039 : }
26040 2 : __pyx_t_1 = __Pyx_dict_iterator(((PyObject*)__pyx_v_signatures), 1, ((PyObject *)NULL), (&__pyx_t_7), (&__pyx_t_8)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 339, __pyx_L1_error)
26041 1 : __Pyx_GOTREF(__pyx_t_1);
26042 1 : __Pyx_XDECREF(__pyx_t_6);
26043 1 : __pyx_t_6 = __pyx_t_1;
26044 1 : __pyx_t_1 = 0;
26045 3 : while (1) {
26046 3 : __pyx_t_9 = __Pyx_dict_iter_next(__pyx_t_6, __pyx_t_7, &__pyx_t_5, &__pyx_t_1, NULL, NULL, __pyx_t_8);
26047 3 : if (unlikely(__pyx_t_9 == 0)) break;
26048 2 : if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 339, __pyx_L1_error)
26049 2 : __Pyx_GOTREF(__pyx_t_1);
26050 2 : __Pyx_XDECREF_SET(__pyx_v_sig, __pyx_t_1);
26051 2 : __pyx_t_1 = 0;
26052 2 : __pyx_t_1 = __pyx_v__fused_sigindex;
26053 2 : __Pyx_INCREF(__pyx_t_1);
26054 2 : __Pyx_XDECREF_SET(__pyx_v_sigindex_node, ((PyObject*)__pyx_t_1));
26055 2 : __pyx_t_1 = 0;
26056 2 : __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_strip); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 339, __pyx_L1_error)
26057 2 : __Pyx_GOTREF(__pyx_t_11);
26058 2 : __pyx_t_12 = NULL;
26059 2 : __pyx_t_13 = 0;
26060 : #if CYTHON_UNPACK_METHODS
26061 2 : if (likely(PyMethod_Check(__pyx_t_11))) {
26062 0 : __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11);
26063 0 : if (likely(__pyx_t_12)) {
26064 0 : PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
26065 0 : __Pyx_INCREF(__pyx_t_12);
26066 0 : __Pyx_INCREF(function);
26067 0 : __Pyx_DECREF_SET(__pyx_t_11, function);
26068 : __pyx_t_13 = 1;
26069 : }
26070 : }
26071 : #endif
26072 : {
26073 2 : PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_kp_s__16};
26074 2 : __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_13, 1+__pyx_t_13);
26075 2 : __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
26076 2 : if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 339, __pyx_L1_error)
26077 2 : __Pyx_GOTREF(__pyx_t_10);
26078 2 : __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
26079 : }
26080 2 : __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_split); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 339, __pyx_L1_error)
26081 2 : __Pyx_GOTREF(__pyx_t_11);
26082 2 : __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
26083 2 : __pyx_t_10 = NULL;
26084 2 : __pyx_t_13 = 0;
26085 : #if CYTHON_UNPACK_METHODS
26086 2 : if (likely(PyMethod_Check(__pyx_t_11))) {
26087 0 : __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
26088 0 : if (likely(__pyx_t_10)) {
26089 0 : PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
26090 0 : __Pyx_INCREF(__pyx_t_10);
26091 0 : __Pyx_INCREF(function);
26092 0 : __Pyx_DECREF_SET(__pyx_t_11, function);
26093 : __pyx_t_13 = 1;
26094 : }
26095 : }
26096 : #endif
26097 : {
26098 2 : PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_kp_s__17};
26099 2 : __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_13, 1+__pyx_t_13);
26100 2 : __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
26101 2 : if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 339, __pyx_L1_error)
26102 2 : __Pyx_GOTREF(__pyx_t_1);
26103 2 : __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
26104 : }
26105 4 : __pyx_t_11 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 339, __pyx_L1_error)
26106 2 : __Pyx_GOTREF(__pyx_t_11);
26107 2 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26108 2 : __pyx_t_14 = PyList_GET_SIZE(__pyx_t_11);
26109 2 : if (unlikely(__pyx_t_14 < 1)) {
26110 0 : __Pyx_RaiseNeedMoreValuesError(0+__pyx_t_14); __PYX_ERR(0, 339, __pyx_L1_error)
26111 : }
26112 : #if CYTHON_COMPILING_IN_CPYTHON
26113 2 : __pyx_t_10 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_14-1);
26114 2 : ((PyVarObject*)__pyx_t_11)->ob_size--;
26115 : #else
26116 : __pyx_t_10 = PySequence_ITEM(__pyx_t_11, __pyx_t_14-1);
26117 : #endif
26118 2 : __Pyx_GOTREF(__pyx_t_10);
26119 : #if !CYTHON_COMPILING_IN_CPYTHON
26120 : __pyx_t_12 = PySequence_GetSlice(__pyx_t_11, 0, __pyx_t_14-1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 339, __pyx_L1_error)
26121 : __Pyx_GOTREF(__pyx_t_12);
26122 : __Pyx_DECREF(__pyx_t_11);
26123 : __pyx_t_11 = __pyx_t_12; __pyx_t_12 = NULL;
26124 : #else
26125 2 : CYTHON_UNUSED_VAR(__pyx_t_12);
26126 : #endif
26127 2 : __Pyx_XDECREF_SET(__pyx_v_sig_series, ((PyObject*)__pyx_t_11));
26128 2 : __pyx_t_11 = 0;
26129 2 : __Pyx_XDECREF_SET(__pyx_v_last_type, __pyx_t_10);
26130 2 : __pyx_t_10 = 0;
26131 2 : __pyx_t_1 = __pyx_v_sig_series; __Pyx_INCREF(__pyx_t_1);
26132 : __pyx_t_14 = 0;
26133 2 : for (;;) {
26134 : {
26135 2 : Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
26136 : #if !CYTHON_ASSUME_SAFE_MACROS
26137 : if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 339, __pyx_L1_error)
26138 : #endif
26139 2 : if (__pyx_t_14 >= __pyx_temp) break;
26140 : }
26141 : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
26142 0 : __pyx_t_10 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_14); __Pyx_INCREF(__pyx_t_10); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(0, 339, __pyx_L1_error)
26143 : #else
26144 : __pyx_t_10 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 339, __pyx_L1_error)
26145 : __Pyx_GOTREF(__pyx_t_10);
26146 : #endif
26147 0 : __Pyx_XDECREF_SET(__pyx_v_sig_type, __pyx_t_10);
26148 0 : __pyx_t_10 = 0;
26149 0 : if (unlikely(__pyx_v_sigindex_node == Py_None)) {
26150 0 : PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
26151 0 : __PYX_ERR(0, 339, __pyx_L1_error)
26152 : }
26153 0 : __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_v_sig_type, __pyx_v_sigindex_node, Py_NE)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 339, __pyx_L1_error)
26154 0 : if (__pyx_t_4) {
26155 0 : __pyx_t_10 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 339, __pyx_L1_error)
26156 0 : __Pyx_GOTREF(__pyx_t_10);
26157 0 : if (unlikely(__pyx_v_sigindex_node == Py_None)) {
26158 : PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
26159 : __PYX_ERR(0, 339, __pyx_L1_error)
26160 : }
26161 0 : if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_sig_type, __pyx_t_10) < 0))) __PYX_ERR(0, 339, __pyx_L1_error)
26162 0 : __Pyx_INCREF(__pyx_t_10);
26163 0 : __Pyx_DECREF_SET(__pyx_v_sigindex_node, __pyx_t_10);
26164 0 : __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
26165 0 : goto __pyx_L19;
26166 : }
26167 : /*else*/ {
26168 0 : if (unlikely(__pyx_v_sigindex_node == Py_None)) {
26169 : PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
26170 : __PYX_ERR(0, 339, __pyx_L1_error)
26171 : }
26172 0 : __pyx_t_10 = __Pyx_PyDict_GetItem(__pyx_v_sigindex_node, __pyx_v_sig_type); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 339, __pyx_L1_error)
26173 0 : __Pyx_GOTREF(__pyx_t_10);
26174 0 : __pyx_t_11 = __pyx_t_10;
26175 0 : __Pyx_INCREF(__pyx_t_11);
26176 0 : __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
26177 2 : __Pyx_DECREF_SET(__pyx_v_sigindex_node, ((PyObject*)__pyx_t_11));
26178 : __pyx_t_11 = 0;
26179 : }
26180 : __pyx_L19:;
26181 : }
26182 2 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26183 2 : if (unlikely(__pyx_v_sigindex_node == Py_None)) {
26184 0 : PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
26185 0 : __PYX_ERR(0, 339, __pyx_L1_error)
26186 : }
26187 2 : if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_last_type, __pyx_v_sig) < 0))) __PYX_ERR(0, 339, __pyx_L1_error)
26188 : }
26189 1 : __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
26190 : }
26191 10 : __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 339, __pyx_L1_error)
26192 10 : __Pyx_GOTREF(__pyx_t_6);
26193 10 : __pyx_v_sigindex_matches = ((PyObject*)__pyx_t_6);
26194 10 : __pyx_t_6 = 0;
26195 10 : __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 339, __pyx_L1_error)
26196 10 : __Pyx_GOTREF(__pyx_t_6);
26197 10 : __Pyx_INCREF(__pyx_v__fused_sigindex);
26198 10 : __Pyx_GIVEREF(__pyx_v__fused_sigindex);
26199 10 : if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 0, __pyx_v__fused_sigindex)) __PYX_ERR(0, 339, __pyx_L1_error);
26200 10 : __pyx_v_sigindex_candidates = ((PyObject*)__pyx_t_6);
26201 10 : __pyx_t_6 = 0;
26202 10 : __pyx_t_6 = __pyx_v_dest_sig; __Pyx_INCREF(__pyx_t_6);
26203 : __pyx_t_7 = 0;
26204 20 : for (;;) {
26205 : {
26206 20 : Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6);
26207 : #if !CYTHON_ASSUME_SAFE_MACROS
26208 : if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 339, __pyx_L1_error)
26209 : #endif
26210 20 : if (__pyx_t_7 >= __pyx_temp) break;
26211 : }
26212 : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
26213 10 : __pyx_t_1 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 339, __pyx_L1_error)
26214 : #else
26215 : __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 339, __pyx_L1_error)
26216 : __Pyx_GOTREF(__pyx_t_1);
26217 : #endif
26218 10 : __Pyx_XDECREF_SET(__pyx_v_dst_type, __pyx_t_1);
26219 10 : __pyx_t_1 = 0;
26220 10 : __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 339, __pyx_L1_error)
26221 10 : __Pyx_GOTREF(__pyx_t_1);
26222 10 : __Pyx_XDECREF_SET(__pyx_v_found_matches, ((PyObject*)__pyx_t_1));
26223 10 : __pyx_t_1 = 0;
26224 10 : __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 339, __pyx_L1_error)
26225 10 : __Pyx_GOTREF(__pyx_t_1);
26226 10 : __Pyx_XDECREF_SET(__pyx_v_found_candidates, ((PyObject*)__pyx_t_1));
26227 10 : __pyx_t_1 = 0;
26228 10 : __pyx_t_4 = (__pyx_v_dst_type == Py_None);
26229 10 : if (__pyx_t_4) {
26230 0 : __pyx_t_1 = __pyx_v_sigindex_matches; __Pyx_INCREF(__pyx_t_1);
26231 0 : __pyx_t_5 = 0;
26232 0 : for (;;) {
26233 : {
26234 0 : Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
26235 : #if !CYTHON_ASSUME_SAFE_MACROS
26236 : if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 339, __pyx_L1_error)
26237 : #endif
26238 0 : if (__pyx_t_5 >= __pyx_temp) break;
26239 : }
26240 : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
26241 0 : __pyx_t_11 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_11); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 339, __pyx_L1_error)
26242 : #else
26243 : __pyx_t_11 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 339, __pyx_L1_error)
26244 : __Pyx_GOTREF(__pyx_t_11);
26245 : #endif
26246 0 : __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_11);
26247 0 : __pyx_t_11 = 0;
26248 0 : if (unlikely(__pyx_v_sn == Py_None)) {
26249 0 : PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values");
26250 0 : __PYX_ERR(0, 339, __pyx_L1_error)
26251 : }
26252 0 : __pyx_t_11 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 339, __pyx_L1_error)
26253 0 : __Pyx_GOTREF(__pyx_t_11);
26254 0 : __pyx_t_15 = __Pyx_PyList_Extend(__pyx_v_found_matches, __pyx_t_11); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 339, __pyx_L1_error)
26255 0 : __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
26256 : }
26257 0 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26258 0 : __pyx_t_1 = __pyx_v_sigindex_candidates; __Pyx_INCREF(__pyx_t_1);
26259 0 : __pyx_t_5 = 0;
26260 0 : for (;;) {
26261 : {
26262 0 : Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
26263 : #if !CYTHON_ASSUME_SAFE_MACROS
26264 : if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 339, __pyx_L1_error)
26265 : #endif
26266 0 : if (__pyx_t_5 >= __pyx_temp) break;
26267 : }
26268 : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
26269 0 : __pyx_t_11 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_11); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 339, __pyx_L1_error)
26270 : #else
26271 : __pyx_t_11 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 339, __pyx_L1_error)
26272 : __Pyx_GOTREF(__pyx_t_11);
26273 : #endif
26274 0 : __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_11);
26275 0 : __pyx_t_11 = 0;
26276 0 : if (unlikely(__pyx_v_sn == Py_None)) {
26277 0 : PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values");
26278 0 : __PYX_ERR(0, 339, __pyx_L1_error)
26279 : }
26280 0 : __pyx_t_11 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 339, __pyx_L1_error)
26281 0 : __Pyx_GOTREF(__pyx_t_11);
26282 0 : __pyx_t_15 = __Pyx_PyList_Extend(__pyx_v_found_candidates, __pyx_t_11); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 339, __pyx_L1_error)
26283 0 : __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
26284 : }
26285 0 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26286 0 : goto __pyx_L23;
26287 : }
26288 : /*else*/ {
26289 10 : __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 339, __pyx_L1_error)
26290 10 : __Pyx_GOTREF(__pyx_t_1);
26291 10 : __Pyx_INCREF(__pyx_v_sigindex_matches);
26292 10 : __Pyx_GIVEREF(__pyx_v_sigindex_matches);
26293 10 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_sigindex_matches)) __PYX_ERR(0, 339, __pyx_L1_error);
26294 10 : __Pyx_INCREF(__pyx_v_sigindex_candidates);
26295 10 : __Pyx_GIVEREF(__pyx_v_sigindex_candidates);
26296 10 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_sigindex_candidates)) __PYX_ERR(0, 339, __pyx_L1_error);
26297 10 : __pyx_t_11 = __pyx_t_1; __Pyx_INCREF(__pyx_t_11);
26298 10 : __pyx_t_5 = 0;
26299 20 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26300 50 : for (;;) {
26301 30 : if (__pyx_t_5 >= 2) break;
26302 : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
26303 20 : __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 339, __pyx_L1_error)
26304 : #else
26305 : __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_11, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 339, __pyx_L1_error)
26306 : __Pyx_GOTREF(__pyx_t_1);
26307 : #endif
26308 20 : __Pyx_XDECREF_SET(__pyx_v_search_list, ((PyObject*)__pyx_t_1));
26309 20 : __pyx_t_1 = 0;
26310 20 : if (unlikely(__pyx_v_search_list == Py_None)) {
26311 0 : PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
26312 0 : __PYX_ERR(0, 339, __pyx_L1_error)
26313 : }
26314 20 : __pyx_t_1 = __pyx_v_search_list; __Pyx_INCREF(__pyx_t_1);
26315 : __pyx_t_14 = 0;
26316 30 : for (;;) {
26317 : {
26318 30 : Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
26319 : #if !CYTHON_ASSUME_SAFE_MACROS
26320 : if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 339, __pyx_L1_error)
26321 : #endif
26322 30 : if (__pyx_t_14 >= __pyx_temp) break;
26323 : }
26324 : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
26325 10 : __pyx_t_10 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_14); __Pyx_INCREF(__pyx_t_10); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(0, 339, __pyx_L1_error)
26326 : #else
26327 : __pyx_t_10 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 339, __pyx_L1_error)
26328 : __Pyx_GOTREF(__pyx_t_10);
26329 : #endif
26330 10 : __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_10);
26331 10 : __pyx_t_10 = 0;
26332 10 : if (unlikely(__pyx_v_sn == Py_None)) {
26333 0 : PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
26334 0 : __PYX_ERR(0, 339, __pyx_L1_error)
26335 : }
26336 10 : __pyx_t_10 = __Pyx_PyDict_GetItemDefault(((PyObject*)__pyx_v_sn), __pyx_v_dst_type, Py_None); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 339, __pyx_L1_error)
26337 10 : __Pyx_GOTREF(__pyx_t_10);
26338 10 : __Pyx_XDECREF_SET(__pyx_v_type_match, __pyx_t_10);
26339 10 : __pyx_t_10 = 0;
26340 10 : __pyx_t_4 = (__pyx_v_type_match != Py_None);
26341 10 : if (__pyx_t_4) {
26342 10 : __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_found_matches, __pyx_v_type_match); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 339, __pyx_L1_error)
26343 : }
26344 : }
26345 40 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26346 : }
26347 10 : __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
26348 : }
26349 10 : __pyx_L23:;
26350 10 : __Pyx_INCREF(__pyx_v_found_matches);
26351 10 : __Pyx_DECREF_SET(__pyx_v_sigindex_matches, __pyx_v_found_matches);
26352 10 : __Pyx_INCREF(__pyx_v_found_candidates);
26353 10 : __Pyx_DECREF_SET(__pyx_v_sigindex_candidates, __pyx_v_found_candidates);
26354 10 : __pyx_t_2 = (PyList_GET_SIZE(__pyx_v_found_matches) != 0);
26355 10 : if (!__pyx_t_2) {
26356 0 : } else {
26357 10 : __pyx_t_4 = __pyx_t_2;
26358 10 : goto __pyx_L38_bool_binop_done;
26359 : }
26360 0 : __pyx_t_2 = (PyList_GET_SIZE(__pyx_v_found_candidates) != 0);
26361 0 : __pyx_t_4 = __pyx_t_2;
26362 10 : __pyx_L38_bool_binop_done:;
26363 10 : __pyx_t_2 = (!__pyx_t_4);
26364 10 : if (__pyx_t_2) {
26365 0 : goto __pyx_L22_break;
26366 : }
26367 : }
26368 10 : __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
26369 10 : goto __pyx_L40_for_end;
26370 0 : __pyx_L22_break:;
26371 0 : __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
26372 0 : goto __pyx_L40_for_end;
26373 10 : __pyx_L40_for_end:;
26374 10 : __Pyx_INCREF(__pyx_v_sigindex_matches);
26375 10 : __pyx_v_candidates = __pyx_v_sigindex_matches;
26376 10 : __pyx_t_2 = (PyList_GET_SIZE(__pyx_v_candidates) != 0);
26377 10 : __pyx_t_4 = (!__pyx_t_2);
26378 10 : if (unlikely(__pyx_t_4)) {
26379 0 : __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 339, __pyx_L1_error)
26380 0 : __Pyx_GOTREF(__pyx_t_6);
26381 0 : __Pyx_Raise(__pyx_t_6, 0, 0, 0);
26382 0 : __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
26383 0 : __PYX_ERR(0, 339, __pyx_L1_error)
26384 : }
26385 10 : __pyx_t_7 = __Pyx_PyList_GET_SIZE(__pyx_v_candidates); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 339, __pyx_L1_error)
26386 10 : __pyx_t_4 = (__pyx_t_7 > 1);
26387 10 : if (unlikely(__pyx_t_4)) {
26388 0 : __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 339, __pyx_L1_error)
26389 0 : __Pyx_GOTREF(__pyx_t_6);
26390 0 : __Pyx_Raise(__pyx_t_6, 0, 0, 0);
26391 0 : __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
26392 0 : __PYX_ERR(0, 339, __pyx_L1_error)
26393 : }
26394 : /*else*/ {
26395 10 : __Pyx_XDECREF(__pyx_r);
26396 10 : if (unlikely(__pyx_v_signatures == Py_None)) {
26397 0 : PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
26398 0 : __PYX_ERR(0, 339, __pyx_L1_error)
26399 : }
26400 10 : __pyx_t_6 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_signatures), PyList_GET_ITEM(__pyx_v_candidates, 0)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 339, __pyx_L1_error)
26401 10 : __Pyx_GOTREF(__pyx_t_6);
26402 10 : __pyx_r = __pyx_t_6;
26403 10 : __pyx_t_6 = 0;
26404 10 : goto __pyx_L0;
26405 : }
26406 :
26407 : /* function exit code */
26408 0 : __pyx_L1_error:;
26409 0 : __Pyx_XDECREF(__pyx_t_1);
26410 0 : __Pyx_XDECREF(__pyx_t_6);
26411 0 : __Pyx_XDECREF(__pyx_t_10);
26412 0 : __Pyx_XDECREF(__pyx_t_11);
26413 0 : __Pyx_XDECREF(__pyx_t_12);
26414 0 : __Pyx_AddTraceback("scipy.stats._sobol.__pyx_fused_cpdef", __pyx_clineno, __pyx_lineno, __pyx_filename);
26415 0 : __pyx_r = NULL;
26416 10 : __pyx_L0:;
26417 10 : __Pyx_XDECREF(__pyx_v_search_list);
26418 10 : __Pyx_XDECREF(__pyx_v_sigindex_node);
26419 10 : __Pyx_XDECREF(__pyx_v_dest_sig);
26420 10 : __Pyx_XDECREF(__pyx_v_arg);
26421 10 : __Pyx_XDECREF(__pyx_v_sig);
26422 10 : __Pyx_XDECREF(__pyx_v_sig_series);
26423 10 : __Pyx_XDECREF(__pyx_v_last_type);
26424 10 : __Pyx_XDECREF(__pyx_v_sig_type);
26425 10 : __Pyx_XDECREF(__pyx_v_sigindex_matches);
26426 10 : __Pyx_XDECREF(__pyx_v_sigindex_candidates);
26427 10 : __Pyx_XDECREF(__pyx_v_dst_type);
26428 10 : __Pyx_XDECREF(__pyx_v_found_matches);
26429 10 : __Pyx_XDECREF(__pyx_v_found_candidates);
26430 10 : __Pyx_XDECREF(__pyx_v_sn);
26431 10 : __Pyx_XDECREF(__pyx_v_type_match);
26432 10 : __Pyx_XDECREF(__pyx_v_candidates);
26433 10 : __Pyx_XDECREF(__pyx_v_kwargs);
26434 10 : __Pyx_XGIVEREF(__pyx_r);
26435 10 : __Pyx_RefNannyFinishContext();
26436 10 : return __pyx_r;
26437 : }
26438 :
26439 : static PyObject *__pyx_pw_5scipy_5stats_6_sobol_31__pyx_fuse_0_fast_forward(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
26440 : static PyObject *__pyx_pw_5scipy_5stats_6_sobol_9_fast_forward(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
26441 10 : static void __pyx_fuse_0__pyx_f_5scipy_5stats_6_sobol__fast_forward(__pyx_t_5numpy_uint32_t const __pyx_v_n, __pyx_t_5numpy_uint32_t const __pyx_v_num_gen, int const __pyx_v_dim, __Pyx_memviewslice __pyx_v_sv, __Pyx_memviewslice __pyx_v_quasi, CYTHON_UNUSED int __pyx_skip_dispatch) {
26442 10 : int __pyx_v_j;
26443 10 : int __pyx_v_l;
26444 10 : __pyx_t_5numpy_uint32_t __pyx_v_num_gen_loc;
26445 10 : CYTHON_UNUSED __pyx_t_5numpy_uint32_t __pyx_v_i;
26446 10 : __pyx_t_5numpy_uint32_t __pyx_t_1;
26447 10 : __pyx_t_5numpy_uint32_t __pyx_t_2;
26448 10 : __pyx_t_5numpy_uint32_t __pyx_t_3;
26449 10 : int __pyx_t_4;
26450 10 : int __pyx_t_5;
26451 10 : int __pyx_t_6;
26452 10 : Py_ssize_t __pyx_t_7;
26453 10 : Py_ssize_t __pyx_t_8;
26454 10 : Py_ssize_t __pyx_t_9;
26455 10 : Py_ssize_t __pyx_t_10;
26456 :
26457 : /* "scipy/stats/_sobol.pyx":345
26458 : * uint_32_64[::1] quasi) noexcept nogil:
26459 : * cdef int j, l
26460 : * cdef uint_32_64 num_gen_loc = num_gen # <<<<<<<<<<<<<<
26461 : * cdef uint_32_64 i
26462 : * for i in range(n):
26463 : */
26464 10 : __pyx_v_num_gen_loc = __pyx_v_num_gen;
26465 :
26466 : /* "scipy/stats/_sobol.pyx":347
26467 : * cdef uint_32_64 num_gen_loc = num_gen
26468 : * cdef uint_32_64 i
26469 : * for i in range(n): # <<<<<<<<<<<<<<
26470 : * l = low_0_bit(num_gen_loc)
26471 : * for j in range(dim):
26472 : */
26473 10 : __pyx_t_1 = __pyx_v_n;
26474 10 : __pyx_t_2 = __pyx_t_1;
26475 24 : for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
26476 : __pyx_v_i = __pyx_t_3;
26477 :
26478 : /* "scipy/stats/_sobol.pyx":348
26479 : * cdef uint_32_64 i
26480 : * for i in range(n):
26481 : * l = low_0_bit(num_gen_loc) # <<<<<<<<<<<<<<
26482 : * for j in range(dim):
26483 : * quasi[j] = quasi[j] ^ sv[j, l - 1]
26484 : */
26485 14 : __pyx_v_l = __pyx_fuse_0__pyx_f_5scipy_5stats_6_sobol_low_0_bit(__pyx_v_num_gen_loc);
26486 :
26487 : /* "scipy/stats/_sobol.pyx":349
26488 : * for i in range(n):
26489 : * l = low_0_bit(num_gen_loc)
26490 : * for j in range(dim): # <<<<<<<<<<<<<<
26491 : * quasi[j] = quasi[j] ^ sv[j, l - 1]
26492 : * num_gen_loc += 1
26493 : */
26494 14 : __pyx_t_4 = __pyx_v_dim;
26495 14 : __pyx_t_5 = __pyx_t_4;
26496 42 : for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
26497 28 : __pyx_v_j = __pyx_t_6;
26498 :
26499 : /* "scipy/stats/_sobol.pyx":350
26500 : * l = low_0_bit(num_gen_loc)
26501 : * for j in range(dim):
26502 : * quasi[j] = quasi[j] ^ sv[j, l - 1] # <<<<<<<<<<<<<<
26503 : * num_gen_loc += 1
26504 : *
26505 : */
26506 28 : __pyx_t_7 = __pyx_v_j;
26507 28 : __pyx_t_8 = __pyx_v_j;
26508 28 : __pyx_t_9 = (__pyx_v_l - 1);
26509 28 : __pyx_t_10 = __pyx_v_j;
26510 28 : *((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ ((char *) (((__pyx_t_5numpy_uint32_t *) __pyx_v_quasi.data) + __pyx_t_10)) )) = ((*((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ ((char *) (((__pyx_t_5numpy_uint32_t *) __pyx_v_quasi.data) + __pyx_t_7)) ))) ^ (*((__pyx_t_5numpy_uint32_t const *) ( /* dim=1 */ ((char *) (((__pyx_t_5numpy_uint32_t const *) ( /* dim=0 */ (__pyx_v_sv.data + __pyx_t_8 * __pyx_v_sv.strides[0]) )) + __pyx_t_9)) ))));
26511 : }
26512 :
26513 : /* "scipy/stats/_sobol.pyx":351
26514 : * for j in range(dim):
26515 : * quasi[j] = quasi[j] ^ sv[j, l - 1]
26516 : * num_gen_loc += 1 # <<<<<<<<<<<<<<
26517 : *
26518 : *
26519 : */
26520 14 : __pyx_v_num_gen_loc = (__pyx_v_num_gen_loc + 1);
26521 : }
26522 :
26523 : /* "scipy/stats/_sobol.pyx":339
26524 : * @cython.boundscheck(False)
26525 : * @cython.wraparound(False)
26526 : * cpdef void _fast_forward(const uint_32_64 n, # <<<<<<<<<<<<<<
26527 : * const uint_32_64 num_gen,
26528 : * const int dim,
26529 : */
26530 :
26531 : /* function exit code */
26532 10 : }
26533 :
26534 : /* Python wrapper */
26535 : static PyObject *__pyx_pw_5scipy_5stats_6_sobol_31__pyx_fuse_0_fast_forward(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
26536 : static PyMethodDef __pyx_fuse_0__pyx_mdef_5scipy_5stats_6_sobol_31__pyx_fuse_0_fast_forward = {"__pyx_fuse_0_fast_forward", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5scipy_5stats_6_sobol_31__pyx_fuse_0_fast_forward, METH_VARARGS|METH_KEYWORDS, 0};
26537 10 : static PyObject *__pyx_pw_5scipy_5stats_6_sobol_31__pyx_fuse_0_fast_forward(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
26538 10 : __pyx_t_5numpy_uint32_t __pyx_v_n;
26539 10 : __pyx_t_5numpy_uint32_t __pyx_v_num_gen;
26540 10 : int __pyx_v_dim;
26541 10 : __Pyx_memviewslice __pyx_v_sv = { 0, 0, { 0 }, { 0 }, { 0 } };
26542 10 : __Pyx_memviewslice __pyx_v_quasi = { 0, 0, { 0 }, { 0 }, { 0 } };
26543 10 : CYTHON_UNUSED Py_ssize_t __pyx_nargs;
26544 10 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
26545 10 : PyObject* values[5] = {0,0,0,0,0};
26546 10 : int __pyx_lineno = 0;
26547 10 : const char *__pyx_filename = NULL;
26548 10 : int __pyx_clineno = 0;
26549 10 : PyObject *__pyx_r = 0;
26550 : __Pyx_RefNannyDeclarations
26551 10 : __Pyx_RefNannySetupContext("__pyx_fuse_0_fast_forward (wrapper)", 0);
26552 : #if CYTHON_ASSUME_SAFE_MACROS
26553 10 : __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
26554 : #else
26555 : __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
26556 : #endif
26557 10 : __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
26558 : {
26559 10 : PyObject **__pyx_pyargnames[] = {&__pyx_n_s_n,&__pyx_n_s_num_gen,&__pyx_n_s_dim,&__pyx_n_s_sv,&__pyx_n_s_quasi,0};
26560 10 : if (__pyx_kwds) {
26561 10 : Py_ssize_t kw_args;
26562 10 : switch (__pyx_nargs) {
26563 0 : case 5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
26564 0 : CYTHON_FALLTHROUGH;
26565 0 : case 4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
26566 0 : CYTHON_FALLTHROUGH;
26567 0 : case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
26568 0 : CYTHON_FALLTHROUGH;
26569 0 : case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
26570 0 : CYTHON_FALLTHROUGH;
26571 0 : case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
26572 10 : CYTHON_FALLTHROUGH;
26573 10 : case 0: break;
26574 0 : default: goto __pyx_L5_argtuple_error;
26575 : }
26576 10 : kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
26577 10 : switch (__pyx_nargs) {
26578 10 : case 0:
26579 10 : if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_n)) != 0)) {
26580 10 : (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
26581 10 : kw_args--;
26582 : }
26583 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 339, __pyx_L3_error)
26584 0 : else goto __pyx_L5_argtuple_error;
26585 10 : CYTHON_FALLTHROUGH;
26586 : case 1:
26587 10 : if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_num_gen)) != 0)) {
26588 10 : (void)__Pyx_Arg_NewRef_VARARGS(values[1]);
26589 10 : kw_args--;
26590 : }
26591 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 339, __pyx_L3_error)
26592 : else {
26593 0 : __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_fast_forward", 1, 5, 5, 1); __PYX_ERR(0, 339, __pyx_L3_error)
26594 : }
26595 10 : CYTHON_FALLTHROUGH;
26596 : case 2:
26597 10 : if (likely((values[2] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_dim)) != 0)) {
26598 10 : (void)__Pyx_Arg_NewRef_VARARGS(values[2]);
26599 10 : kw_args--;
26600 : }
26601 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 339, __pyx_L3_error)
26602 : else {
26603 0 : __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_fast_forward", 1, 5, 5, 2); __PYX_ERR(0, 339, __pyx_L3_error)
26604 : }
26605 10 : CYTHON_FALLTHROUGH;
26606 : case 3:
26607 10 : if (likely((values[3] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_sv)) != 0)) {
26608 10 : (void)__Pyx_Arg_NewRef_VARARGS(values[3]);
26609 10 : kw_args--;
26610 : }
26611 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 339, __pyx_L3_error)
26612 : else {
26613 0 : __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_fast_forward", 1, 5, 5, 3); __PYX_ERR(0, 339, __pyx_L3_error)
26614 : }
26615 10 : CYTHON_FALLTHROUGH;
26616 : case 4:
26617 10 : if (likely((values[4] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_quasi)) != 0)) {
26618 10 : (void)__Pyx_Arg_NewRef_VARARGS(values[4]);
26619 10 : kw_args--;
26620 : }
26621 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 339, __pyx_L3_error)
26622 : else {
26623 0 : __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_fast_forward", 1, 5, 5, 4); __PYX_ERR(0, 339, __pyx_L3_error)
26624 : }
26625 : }
26626 10 : if (unlikely(kw_args > 0)) {
26627 0 : const Py_ssize_t kwd_pos_args = __pyx_nargs;
26628 0 : if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_0_fast_forward") < 0)) __PYX_ERR(0, 339, __pyx_L3_error)
26629 : }
26630 0 : } else if (unlikely(__pyx_nargs != 5)) {
26631 0 : goto __pyx_L5_argtuple_error;
26632 : } else {
26633 0 : values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
26634 0 : values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
26635 0 : values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
26636 0 : values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
26637 0 : values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
26638 : }
26639 10 : __pyx_v_n = __Pyx_PyInt_As_npy_uint32(values[0]); if (unlikely((__pyx_v_n == ((npy_uint32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 339, __pyx_L3_error)
26640 10 : __pyx_v_num_gen = __Pyx_PyInt_As_npy_uint32(values[1]); if (unlikely((__pyx_v_num_gen == ((npy_uint32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 340, __pyx_L3_error)
26641 10 : __pyx_v_dim = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_dim == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 341, __pyx_L3_error)
26642 10 : __pyx_v_sv = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_5numpy_uint32_t__const__(values[3], 0); if (unlikely(!__pyx_v_sv.memview)) __PYX_ERR(0, 342, __pyx_L3_error)
26643 10 : __pyx_v_quasi = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_uint32_t(values[4], PyBUF_WRITABLE); if (unlikely(!__pyx_v_quasi.memview)) __PYX_ERR(0, 343, __pyx_L3_error)
26644 : }
26645 10 : goto __pyx_L6_skip;
26646 0 : __pyx_L5_argtuple_error:;
26647 0 : __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_fast_forward", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 339, __pyx_L3_error)
26648 10 : __pyx_L6_skip:;
26649 10 : goto __pyx_L4_argument_unpacking_done;
26650 0 : __pyx_L3_error:;
26651 : {
26652 0 : Py_ssize_t __pyx_temp;
26653 0 : for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
26654 : __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
26655 : }
26656 : }
26657 0 : __PYX_XCLEAR_MEMVIEW(&__pyx_v_sv, 1);
26658 0 : __PYX_XCLEAR_MEMVIEW(&__pyx_v_quasi, 1);
26659 0 : __Pyx_AddTraceback("scipy.stats._sobol.__pyx_fuse_0_fast_forward", __pyx_clineno, __pyx_lineno, __pyx_filename);
26660 0 : __Pyx_RefNannyFinishContext();
26661 0 : return NULL;
26662 10 : __pyx_L4_argument_unpacking_done:;
26663 10 : __pyx_r = __pyx_pf_5scipy_5stats_6_sobol_30__pyx_fuse_0_fast_forward(__pyx_self, __pyx_v_n, __pyx_v_num_gen, __pyx_v_dim, __pyx_v_sv, __pyx_v_quasi);
26664 :
26665 : /* function exit code */
26666 10 : __PYX_XCLEAR_MEMVIEW(&__pyx_v_sv, 1);
26667 10 : __PYX_XCLEAR_MEMVIEW(&__pyx_v_quasi, 1);
26668 : {
26669 10 : Py_ssize_t __pyx_temp;
26670 10 : for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
26671 : __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
26672 : }
26673 : }
26674 : __Pyx_RefNannyFinishContext();
26675 : return __pyx_r;
26676 : }
26677 :
26678 10 : static PyObject *__pyx_pf_5scipy_5stats_6_sobol_30__pyx_fuse_0_fast_forward(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_uint32_t __pyx_v_n, __pyx_t_5numpy_uint32_t __pyx_v_num_gen, int __pyx_v_dim, __Pyx_memviewslice __pyx_v_sv, __Pyx_memviewslice __pyx_v_quasi) {
26679 10 : PyObject *__pyx_r = NULL;
26680 : __Pyx_RefNannyDeclarations
26681 10 : PyObject *__pyx_t_1 = NULL;
26682 10 : int __pyx_lineno = 0;
26683 10 : const char *__pyx_filename = NULL;
26684 10 : int __pyx_clineno = 0;
26685 10 : __Pyx_RefNannySetupContext("__pyx_fuse_0_fast_forward", 1);
26686 10 : __Pyx_XDECREF(__pyx_r);
26687 10 : if (unlikely(!__pyx_v_sv.memview)) { __Pyx_RaiseUnboundLocalError("sv"); __PYX_ERR(0, 339, __pyx_L1_error) }
26688 10 : if (unlikely(!__pyx_v_quasi.memview)) { __Pyx_RaiseUnboundLocalError("quasi"); __PYX_ERR(0, 339, __pyx_L1_error) }
26689 10 : __pyx_t_1 = __Pyx_void_to_None(__pyx_fuse_0__pyx_f_5scipy_5stats_6_sobol__fast_forward(__pyx_v_n, __pyx_v_num_gen, __pyx_v_dim, __pyx_v_sv, __pyx_v_quasi, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 339, __pyx_L1_error)
26690 10 : __Pyx_GOTREF(__pyx_t_1);
26691 10 : __pyx_r = __pyx_t_1;
26692 10 : __pyx_t_1 = 0;
26693 10 : goto __pyx_L0;
26694 :
26695 : /* function exit code */
26696 0 : __pyx_L1_error:;
26697 0 : __Pyx_XDECREF(__pyx_t_1);
26698 0 : __Pyx_AddTraceback("scipy.stats._sobol.__pyx_fuse_0_fast_forward", __pyx_clineno, __pyx_lineno, __pyx_filename);
26699 0 : __pyx_r = NULL;
26700 10 : __pyx_L0:;
26701 10 : __Pyx_XGIVEREF(__pyx_r);
26702 10 : __Pyx_RefNannyFinishContext();
26703 10 : return __pyx_r;
26704 : }
26705 :
26706 : static PyObject *__pyx_pw_5scipy_5stats_6_sobol_33__pyx_fuse_1_fast_forward(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
26707 : static PyObject *__pyx_pw_5scipy_5stats_6_sobol_9_fast_forward(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
26708 0 : static void __pyx_fuse_1__pyx_f_5scipy_5stats_6_sobol__fast_forward(__pyx_t_5numpy_uint64_t const __pyx_v_n, __pyx_t_5numpy_uint64_t const __pyx_v_num_gen, int const __pyx_v_dim, __Pyx_memviewslice __pyx_v_sv, __Pyx_memviewslice __pyx_v_quasi, CYTHON_UNUSED int __pyx_skip_dispatch) {
26709 0 : int __pyx_v_j;
26710 0 : int __pyx_v_l;
26711 0 : __pyx_t_5numpy_uint64_t __pyx_v_num_gen_loc;
26712 0 : CYTHON_UNUSED __pyx_t_5numpy_uint64_t __pyx_v_i;
26713 0 : __pyx_t_5numpy_uint64_t __pyx_t_1;
26714 0 : __pyx_t_5numpy_uint64_t __pyx_t_2;
26715 0 : __pyx_t_5numpy_uint64_t __pyx_t_3;
26716 0 : int __pyx_t_4;
26717 0 : int __pyx_t_5;
26718 0 : int __pyx_t_6;
26719 0 : Py_ssize_t __pyx_t_7;
26720 0 : Py_ssize_t __pyx_t_8;
26721 0 : Py_ssize_t __pyx_t_9;
26722 0 : Py_ssize_t __pyx_t_10;
26723 :
26724 : /* "scipy/stats/_sobol.pyx":345
26725 : * uint_32_64[::1] quasi) noexcept nogil:
26726 : * cdef int j, l
26727 : * cdef uint_32_64 num_gen_loc = num_gen # <<<<<<<<<<<<<<
26728 : * cdef uint_32_64 i
26729 : * for i in range(n):
26730 : */
26731 0 : __pyx_v_num_gen_loc = __pyx_v_num_gen;
26732 :
26733 : /* "scipy/stats/_sobol.pyx":347
26734 : * cdef uint_32_64 num_gen_loc = num_gen
26735 : * cdef uint_32_64 i
26736 : * for i in range(n): # <<<<<<<<<<<<<<
26737 : * l = low_0_bit(num_gen_loc)
26738 : * for j in range(dim):
26739 : */
26740 0 : __pyx_t_1 = __pyx_v_n;
26741 0 : __pyx_t_2 = __pyx_t_1;
26742 0 : for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
26743 : __pyx_v_i = __pyx_t_3;
26744 :
26745 : /* "scipy/stats/_sobol.pyx":348
26746 : * cdef uint_32_64 i
26747 : * for i in range(n):
26748 : * l = low_0_bit(num_gen_loc) # <<<<<<<<<<<<<<
26749 : * for j in range(dim):
26750 : * quasi[j] = quasi[j] ^ sv[j, l - 1]
26751 : */
26752 0 : __pyx_v_l = __pyx_fuse_1__pyx_f_5scipy_5stats_6_sobol_low_0_bit(__pyx_v_num_gen_loc);
26753 :
26754 : /* "scipy/stats/_sobol.pyx":349
26755 : * for i in range(n):
26756 : * l = low_0_bit(num_gen_loc)
26757 : * for j in range(dim): # <<<<<<<<<<<<<<
26758 : * quasi[j] = quasi[j] ^ sv[j, l - 1]
26759 : * num_gen_loc += 1
26760 : */
26761 0 : __pyx_t_4 = __pyx_v_dim;
26762 0 : __pyx_t_5 = __pyx_t_4;
26763 0 : for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
26764 0 : __pyx_v_j = __pyx_t_6;
26765 :
26766 : /* "scipy/stats/_sobol.pyx":350
26767 : * l = low_0_bit(num_gen_loc)
26768 : * for j in range(dim):
26769 : * quasi[j] = quasi[j] ^ sv[j, l - 1] # <<<<<<<<<<<<<<
26770 : * num_gen_loc += 1
26771 : *
26772 : */
26773 0 : __pyx_t_7 = __pyx_v_j;
26774 0 : __pyx_t_8 = __pyx_v_j;
26775 0 : __pyx_t_9 = (__pyx_v_l - 1);
26776 0 : __pyx_t_10 = __pyx_v_j;
26777 0 : *((__pyx_t_5numpy_uint64_t *) ( /* dim=0 */ ((char *) (((__pyx_t_5numpy_uint64_t *) __pyx_v_quasi.data) + __pyx_t_10)) )) = ((*((__pyx_t_5numpy_uint64_t *) ( /* dim=0 */ ((char *) (((__pyx_t_5numpy_uint64_t *) __pyx_v_quasi.data) + __pyx_t_7)) ))) ^ (*((__pyx_t_5numpy_uint64_t const *) ( /* dim=1 */ ((char *) (((__pyx_t_5numpy_uint64_t const *) ( /* dim=0 */ (__pyx_v_sv.data + __pyx_t_8 * __pyx_v_sv.strides[0]) )) + __pyx_t_9)) ))));
26778 : }
26779 :
26780 : /* "scipy/stats/_sobol.pyx":351
26781 : * for j in range(dim):
26782 : * quasi[j] = quasi[j] ^ sv[j, l - 1]
26783 : * num_gen_loc += 1 # <<<<<<<<<<<<<<
26784 : *
26785 : *
26786 : */
26787 0 : __pyx_v_num_gen_loc = (__pyx_v_num_gen_loc + 1);
26788 : }
26789 :
26790 : /* "scipy/stats/_sobol.pyx":339
26791 : * @cython.boundscheck(False)
26792 : * @cython.wraparound(False)
26793 : * cpdef void _fast_forward(const uint_32_64 n, # <<<<<<<<<<<<<<
26794 : * const uint_32_64 num_gen,
26795 : * const int dim,
26796 : */
26797 :
26798 : /* function exit code */
26799 0 : }
26800 :
26801 : /* Python wrapper */
26802 : static PyObject *__pyx_pw_5scipy_5stats_6_sobol_33__pyx_fuse_1_fast_forward(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
26803 : static PyMethodDef __pyx_fuse_1__pyx_mdef_5scipy_5stats_6_sobol_33__pyx_fuse_1_fast_forward = {"__pyx_fuse_1_fast_forward", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5scipy_5stats_6_sobol_33__pyx_fuse_1_fast_forward, METH_VARARGS|METH_KEYWORDS, 0};
26804 0 : static PyObject *__pyx_pw_5scipy_5stats_6_sobol_33__pyx_fuse_1_fast_forward(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
26805 0 : __pyx_t_5numpy_uint64_t __pyx_v_n;
26806 0 : __pyx_t_5numpy_uint64_t __pyx_v_num_gen;
26807 0 : int __pyx_v_dim;
26808 0 : __Pyx_memviewslice __pyx_v_sv = { 0, 0, { 0 }, { 0 }, { 0 } };
26809 0 : __Pyx_memviewslice __pyx_v_quasi = { 0, 0, { 0 }, { 0 }, { 0 } };
26810 0 : CYTHON_UNUSED Py_ssize_t __pyx_nargs;
26811 0 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
26812 0 : PyObject* values[5] = {0,0,0,0,0};
26813 0 : int __pyx_lineno = 0;
26814 0 : const char *__pyx_filename = NULL;
26815 0 : int __pyx_clineno = 0;
26816 0 : PyObject *__pyx_r = 0;
26817 : __Pyx_RefNannyDeclarations
26818 0 : __Pyx_RefNannySetupContext("__pyx_fuse_1_fast_forward (wrapper)", 0);
26819 : #if CYTHON_ASSUME_SAFE_MACROS
26820 0 : __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
26821 : #else
26822 : __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
26823 : #endif
26824 0 : __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
26825 : {
26826 0 : PyObject **__pyx_pyargnames[] = {&__pyx_n_s_n,&__pyx_n_s_num_gen,&__pyx_n_s_dim,&__pyx_n_s_sv,&__pyx_n_s_quasi,0};
26827 0 : if (__pyx_kwds) {
26828 0 : Py_ssize_t kw_args;
26829 0 : switch (__pyx_nargs) {
26830 0 : case 5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
26831 0 : CYTHON_FALLTHROUGH;
26832 0 : case 4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
26833 0 : CYTHON_FALLTHROUGH;
26834 0 : case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
26835 0 : CYTHON_FALLTHROUGH;
26836 0 : case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
26837 0 : CYTHON_FALLTHROUGH;
26838 0 : case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
26839 0 : CYTHON_FALLTHROUGH;
26840 0 : case 0: break;
26841 0 : default: goto __pyx_L5_argtuple_error;
26842 : }
26843 0 : kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
26844 0 : switch (__pyx_nargs) {
26845 0 : case 0:
26846 0 : if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_n)) != 0)) {
26847 0 : (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
26848 0 : kw_args--;
26849 : }
26850 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 339, __pyx_L3_error)
26851 0 : else goto __pyx_L5_argtuple_error;
26852 0 : CYTHON_FALLTHROUGH;
26853 : case 1:
26854 0 : if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_num_gen)) != 0)) {
26855 0 : (void)__Pyx_Arg_NewRef_VARARGS(values[1]);
26856 0 : kw_args--;
26857 : }
26858 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 339, __pyx_L3_error)
26859 : else {
26860 0 : __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_fast_forward", 1, 5, 5, 1); __PYX_ERR(0, 339, __pyx_L3_error)
26861 : }
26862 0 : CYTHON_FALLTHROUGH;
26863 : case 2:
26864 0 : if (likely((values[2] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_dim)) != 0)) {
26865 0 : (void)__Pyx_Arg_NewRef_VARARGS(values[2]);
26866 0 : kw_args--;
26867 : }
26868 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 339, __pyx_L3_error)
26869 : else {
26870 0 : __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_fast_forward", 1, 5, 5, 2); __PYX_ERR(0, 339, __pyx_L3_error)
26871 : }
26872 0 : CYTHON_FALLTHROUGH;
26873 : case 3:
26874 0 : if (likely((values[3] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_sv)) != 0)) {
26875 0 : (void)__Pyx_Arg_NewRef_VARARGS(values[3]);
26876 0 : kw_args--;
26877 : }
26878 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 339, __pyx_L3_error)
26879 : else {
26880 0 : __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_fast_forward", 1, 5, 5, 3); __PYX_ERR(0, 339, __pyx_L3_error)
26881 : }
26882 0 : CYTHON_FALLTHROUGH;
26883 : case 4:
26884 0 : if (likely((values[4] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_quasi)) != 0)) {
26885 0 : (void)__Pyx_Arg_NewRef_VARARGS(values[4]);
26886 0 : kw_args--;
26887 : }
26888 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 339, __pyx_L3_error)
26889 : else {
26890 0 : __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_fast_forward", 1, 5, 5, 4); __PYX_ERR(0, 339, __pyx_L3_error)
26891 : }
26892 : }
26893 0 : if (unlikely(kw_args > 0)) {
26894 0 : const Py_ssize_t kwd_pos_args = __pyx_nargs;
26895 0 : if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_1_fast_forward") < 0)) __PYX_ERR(0, 339, __pyx_L3_error)
26896 : }
26897 0 : } else if (unlikely(__pyx_nargs != 5)) {
26898 0 : goto __pyx_L5_argtuple_error;
26899 : } else {
26900 0 : values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
26901 0 : values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
26902 0 : values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
26903 0 : values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
26904 0 : values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
26905 : }
26906 0 : __pyx_v_n = __Pyx_PyInt_As_npy_uint64(values[0]); if (unlikely((__pyx_v_n == ((npy_uint64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 339, __pyx_L3_error)
26907 0 : __pyx_v_num_gen = __Pyx_PyInt_As_npy_uint64(values[1]); if (unlikely((__pyx_v_num_gen == ((npy_uint64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 340, __pyx_L3_error)
26908 0 : __pyx_v_dim = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_dim == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 341, __pyx_L3_error)
26909 0 : __pyx_v_sv = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_5numpy_uint64_t__const__(values[3], 0); if (unlikely(!__pyx_v_sv.memview)) __PYX_ERR(0, 342, __pyx_L3_error)
26910 0 : __pyx_v_quasi = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_uint64_t(values[4], PyBUF_WRITABLE); if (unlikely(!__pyx_v_quasi.memview)) __PYX_ERR(0, 343, __pyx_L3_error)
26911 : }
26912 0 : goto __pyx_L6_skip;
26913 0 : __pyx_L5_argtuple_error:;
26914 0 : __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_fast_forward", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 339, __pyx_L3_error)
26915 0 : __pyx_L6_skip:;
26916 0 : goto __pyx_L4_argument_unpacking_done;
26917 0 : __pyx_L3_error:;
26918 : {
26919 0 : Py_ssize_t __pyx_temp;
26920 0 : for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
26921 : __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
26922 : }
26923 : }
26924 0 : __PYX_XCLEAR_MEMVIEW(&__pyx_v_sv, 1);
26925 0 : __PYX_XCLEAR_MEMVIEW(&__pyx_v_quasi, 1);
26926 0 : __Pyx_AddTraceback("scipy.stats._sobol.__pyx_fuse_1_fast_forward", __pyx_clineno, __pyx_lineno, __pyx_filename);
26927 0 : __Pyx_RefNannyFinishContext();
26928 0 : return NULL;
26929 0 : __pyx_L4_argument_unpacking_done:;
26930 0 : __pyx_r = __pyx_pf_5scipy_5stats_6_sobol_32__pyx_fuse_1_fast_forward(__pyx_self, __pyx_v_n, __pyx_v_num_gen, __pyx_v_dim, __pyx_v_sv, __pyx_v_quasi);
26931 :
26932 : /* function exit code */
26933 0 : __PYX_XCLEAR_MEMVIEW(&__pyx_v_sv, 1);
26934 0 : __PYX_XCLEAR_MEMVIEW(&__pyx_v_quasi, 1);
26935 : {
26936 0 : Py_ssize_t __pyx_temp;
26937 0 : for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
26938 : __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
26939 : }
26940 : }
26941 : __Pyx_RefNannyFinishContext();
26942 : return __pyx_r;
26943 : }
26944 :
26945 0 : static PyObject *__pyx_pf_5scipy_5stats_6_sobol_32__pyx_fuse_1_fast_forward(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_uint64_t __pyx_v_n, __pyx_t_5numpy_uint64_t __pyx_v_num_gen, int __pyx_v_dim, __Pyx_memviewslice __pyx_v_sv, __Pyx_memviewslice __pyx_v_quasi) {
26946 0 : PyObject *__pyx_r = NULL;
26947 : __Pyx_RefNannyDeclarations
26948 0 : PyObject *__pyx_t_1 = NULL;
26949 0 : int __pyx_lineno = 0;
26950 0 : const char *__pyx_filename = NULL;
26951 0 : int __pyx_clineno = 0;
26952 0 : __Pyx_RefNannySetupContext("__pyx_fuse_1_fast_forward", 1);
26953 0 : __Pyx_XDECREF(__pyx_r);
26954 0 : if (unlikely(!__pyx_v_sv.memview)) { __Pyx_RaiseUnboundLocalError("sv"); __PYX_ERR(0, 339, __pyx_L1_error) }
26955 0 : if (unlikely(!__pyx_v_quasi.memview)) { __Pyx_RaiseUnboundLocalError("quasi"); __PYX_ERR(0, 339, __pyx_L1_error) }
26956 0 : __pyx_t_1 = __Pyx_void_to_None(__pyx_fuse_1__pyx_f_5scipy_5stats_6_sobol__fast_forward(__pyx_v_n, __pyx_v_num_gen, __pyx_v_dim, __pyx_v_sv, __pyx_v_quasi, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 339, __pyx_L1_error)
26957 0 : __Pyx_GOTREF(__pyx_t_1);
26958 0 : __pyx_r = __pyx_t_1;
26959 0 : __pyx_t_1 = 0;
26960 0 : goto __pyx_L0;
26961 :
26962 : /* function exit code */
26963 0 : __pyx_L1_error:;
26964 0 : __Pyx_XDECREF(__pyx_t_1);
26965 0 : __Pyx_AddTraceback("scipy.stats._sobol.__pyx_fuse_1_fast_forward", __pyx_clineno, __pyx_lineno, __pyx_filename);
26966 0 : __pyx_r = NULL;
26967 0 : __pyx_L0:;
26968 0 : __Pyx_XGIVEREF(__pyx_r);
26969 0 : __Pyx_RefNannyFinishContext();
26970 0 : return __pyx_r;
26971 : }
26972 :
26973 : /* "scipy/stats/_sobol.pyx":356
26974 : * @cython.boundscheck(False)
26975 : * @cython.wraparound(False)
26976 : * cdef uint_32_64 cdot_pow2(const uint_32_64[::1] a) noexcept nogil: # <<<<<<<<<<<<<<
26977 : * cdef int i
26978 : * cdef int size = a.shape[0]
26979 : */
26980 :
26981 557100 : static __pyx_t_5numpy_uint32_t __pyx_fuse_0__pyx_f_5scipy_5stats_6_sobol_cdot_pow2(__Pyx_memviewslice __pyx_v_a) {
26982 557100 : int __pyx_v_i;
26983 557100 : int __pyx_v_size;
26984 557100 : __pyx_t_5numpy_uint32_t __pyx_v_z;
26985 557100 : __pyx_t_5numpy_uint32_t __pyx_v_pow2;
26986 557100 : __pyx_t_5numpy_uint32_t __pyx_r;
26987 557100 : int __pyx_t_1;
26988 557100 : int __pyx_t_2;
26989 557100 : int __pyx_t_3;
26990 557100 : Py_ssize_t __pyx_t_4;
26991 :
26992 : /* "scipy/stats/_sobol.pyx":358
26993 : * cdef uint_32_64 cdot_pow2(const uint_32_64[::1] a) noexcept nogil:
26994 : * cdef int i
26995 : * cdef int size = a.shape[0] # <<<<<<<<<<<<<<
26996 : * cdef uint_32_64 z = 0
26997 : * cdef uint_32_64 pow2 = 1
26998 : */
26999 557100 : __pyx_v_size = (__pyx_v_a.shape[0]);
27000 :
27001 : /* "scipy/stats/_sobol.pyx":359
27002 : * cdef int i
27003 : * cdef int size = a.shape[0]
27004 : * cdef uint_32_64 z = 0 # <<<<<<<<<<<<<<
27005 : * cdef uint_32_64 pow2 = 1
27006 : * for i in range(size):
27007 : */
27008 557100 : __pyx_v_z = 0;
27009 :
27010 : /* "scipy/stats/_sobol.pyx":360
27011 : * cdef int size = a.shape[0]
27012 : * cdef uint_32_64 z = 0
27013 : * cdef uint_32_64 pow2 = 1 # <<<<<<<<<<<<<<
27014 : * for i in range(size):
27015 : * z += a[size - 1 - i] * pow2
27016 : */
27017 557100 : __pyx_v_pow2 = 1;
27018 :
27019 : /* "scipy/stats/_sobol.pyx":361
27020 : * cdef uint_32_64 z = 0
27021 : * cdef uint_32_64 pow2 = 1
27022 : * for i in range(size): # <<<<<<<<<<<<<<
27023 : * z += a[size - 1 - i] * pow2
27024 : * pow2 *= 2
27025 : */
27026 557100 : __pyx_t_1 = __pyx_v_size;
27027 557100 : __pyx_t_2 = __pyx_t_1;
27028 17270100 : for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
27029 16713000 : __pyx_v_i = __pyx_t_3;
27030 :
27031 : /* "scipy/stats/_sobol.pyx":362
27032 : * cdef uint_32_64 pow2 = 1
27033 : * for i in range(size):
27034 : * z += a[size - 1 - i] * pow2 # <<<<<<<<<<<<<<
27035 : * pow2 *= 2
27036 : * return z
27037 : */
27038 16713000 : __pyx_t_4 = ((__pyx_v_size - 1) - __pyx_v_i);
27039 16713000 : __pyx_v_z = (__pyx_v_z + ((*((__pyx_t_5numpy_uint32_t const *) ( /* dim=0 */ ((char *) (((__pyx_t_5numpy_uint32_t const *) __pyx_v_a.data) + __pyx_t_4)) ))) * __pyx_v_pow2));
27040 :
27041 : /* "scipy/stats/_sobol.pyx":363
27042 : * for i in range(size):
27043 : * z += a[size - 1 - i] * pow2
27044 : * pow2 *= 2 # <<<<<<<<<<<<<<
27045 : * return z
27046 : *
27047 : */
27048 16713000 : __pyx_v_pow2 = (__pyx_v_pow2 * 2);
27049 : }
27050 :
27051 : /* "scipy/stats/_sobol.pyx":364
27052 : * z += a[size - 1 - i] * pow2
27053 : * pow2 *= 2
27054 : * return z # <<<<<<<<<<<<<<
27055 : *
27056 : *
27057 : */
27058 557100 : __pyx_r = __pyx_v_z;
27059 557100 : goto __pyx_L0;
27060 :
27061 : /* "scipy/stats/_sobol.pyx":356
27062 : * @cython.boundscheck(False)
27063 : * @cython.wraparound(False)
27064 : * cdef uint_32_64 cdot_pow2(const uint_32_64[::1] a) noexcept nogil: # <<<<<<<<<<<<<<
27065 : * cdef int i
27066 : * cdef int size = a.shape[0]
27067 : */
27068 :
27069 : /* function exit code */
27070 557100 : __pyx_L0:;
27071 557100 : return __pyx_r;
27072 : }
27073 :
27074 221184 : static __pyx_t_5numpy_uint64_t __pyx_fuse_1__pyx_f_5scipy_5stats_6_sobol_cdot_pow2(__Pyx_memviewslice __pyx_v_a) {
27075 221184 : int __pyx_v_i;
27076 221184 : int __pyx_v_size;
27077 221184 : __pyx_t_5numpy_uint64_t __pyx_v_z;
27078 221184 : __pyx_t_5numpy_uint64_t __pyx_v_pow2;
27079 221184 : __pyx_t_5numpy_uint64_t __pyx_r;
27080 221184 : int __pyx_t_1;
27081 221184 : int __pyx_t_2;
27082 221184 : int __pyx_t_3;
27083 221184 : Py_ssize_t __pyx_t_4;
27084 :
27085 : /* "scipy/stats/_sobol.pyx":358
27086 : * cdef uint_32_64 cdot_pow2(const uint_32_64[::1] a) noexcept nogil:
27087 : * cdef int i
27088 : * cdef int size = a.shape[0] # <<<<<<<<<<<<<<
27089 : * cdef uint_32_64 z = 0
27090 : * cdef uint_32_64 pow2 = 1
27091 : */
27092 221184 : __pyx_v_size = (__pyx_v_a.shape[0]);
27093 :
27094 : /* "scipy/stats/_sobol.pyx":359
27095 : * cdef int i
27096 : * cdef int size = a.shape[0]
27097 : * cdef uint_32_64 z = 0 # <<<<<<<<<<<<<<
27098 : * cdef uint_32_64 pow2 = 1
27099 : * for i in range(size):
27100 : */
27101 221184 : __pyx_v_z = 0;
27102 :
27103 : /* "scipy/stats/_sobol.pyx":360
27104 : * cdef int size = a.shape[0]
27105 : * cdef uint_32_64 z = 0
27106 : * cdef uint_32_64 pow2 = 1 # <<<<<<<<<<<<<<
27107 : * for i in range(size):
27108 : * z += a[size - 1 - i] * pow2
27109 : */
27110 221184 : __pyx_v_pow2 = 1;
27111 :
27112 : /* "scipy/stats/_sobol.pyx":361
27113 : * cdef uint_32_64 z = 0
27114 : * cdef uint_32_64 pow2 = 1
27115 : * for i in range(size): # <<<<<<<<<<<<<<
27116 : * z += a[size - 1 - i] * pow2
27117 : * pow2 *= 2
27118 : */
27119 221184 : __pyx_t_1 = __pyx_v_size;
27120 221184 : __pyx_t_2 = __pyx_t_1;
27121 14376960 : for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
27122 14155776 : __pyx_v_i = __pyx_t_3;
27123 :
27124 : /* "scipy/stats/_sobol.pyx":362
27125 : * cdef uint_32_64 pow2 = 1
27126 : * for i in range(size):
27127 : * z += a[size - 1 - i] * pow2 # <<<<<<<<<<<<<<
27128 : * pow2 *= 2
27129 : * return z
27130 : */
27131 14155776 : __pyx_t_4 = ((__pyx_v_size - 1) - __pyx_v_i);
27132 14155776 : __pyx_v_z = (__pyx_v_z + ((*((__pyx_t_5numpy_uint64_t const *) ( /* dim=0 */ ((char *) (((__pyx_t_5numpy_uint64_t const *) __pyx_v_a.data) + __pyx_t_4)) ))) * __pyx_v_pow2));
27133 :
27134 : /* "scipy/stats/_sobol.pyx":363
27135 : * for i in range(size):
27136 : * z += a[size - 1 - i] * pow2
27137 : * pow2 *= 2 # <<<<<<<<<<<<<<
27138 : * return z
27139 : *
27140 : */
27141 14155776 : __pyx_v_pow2 = (__pyx_v_pow2 * 2);
27142 : }
27143 :
27144 : /* "scipy/stats/_sobol.pyx":364
27145 : * z += a[size - 1 - i] * pow2
27146 : * pow2 *= 2
27147 : * return z # <<<<<<<<<<<<<<
27148 : *
27149 : *
27150 : */
27151 221184 : __pyx_r = __pyx_v_z;
27152 221184 : goto __pyx_L0;
27153 :
27154 : /* "scipy/stats/_sobol.pyx":356
27155 : * @cython.boundscheck(False)
27156 : * @cython.wraparound(False)
27157 : * cdef uint_32_64 cdot_pow2(const uint_32_64[::1] a) noexcept nogil: # <<<<<<<<<<<<<<
27158 : * cdef int i
27159 : * cdef int size = a.shape[0]
27160 : */
27161 :
27162 : /* function exit code */
27163 221184 : __pyx_L0:;
27164 221184 : return __pyx_r;
27165 : }
27166 :
27167 : /* "scipy/stats/_sobol.pyx":369
27168 : * @cython.boundscheck(False)
27169 : * @cython.wraparound(False)
27170 : * cpdef void _cscramble(const int dim, # <<<<<<<<<<<<<<
27171 : * const int bits,
27172 : * uint_32_64[:, :, ::1] ltm,
27173 : */
27174 :
27175 : /* Python wrapper */
27176 : static PyObject *__pyx_pw_5scipy_5stats_6_sobol_11_cscramble(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
27177 : PyDoc_STRVAR(__pyx_doc_5scipy_5stats_6_sobol_10_cscramble, "Scrambling using (left) linear matrix scramble (LMS).");
27178 : static PyMethodDef __pyx_mdef_5scipy_5stats_6_sobol_11_cscramble = {"_cscramble", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5scipy_5stats_6_sobol_11_cscramble, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5scipy_5stats_6_sobol_10_cscramble};
27179 250 : static PyObject *__pyx_pw_5scipy_5stats_6_sobol_11_cscramble(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
27180 250 : PyObject *__pyx_v_signatures = 0;
27181 250 : PyObject *__pyx_v_args = 0;
27182 250 : PyObject *__pyx_v_kwargs = 0;
27183 250 : CYTHON_UNUSED PyObject *__pyx_v_defaults = 0;
27184 250 : PyObject *__pyx_v__fused_sigindex = 0;
27185 250 : CYTHON_UNUSED Py_ssize_t __pyx_nargs;
27186 250 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
27187 250 : PyObject* values[5] = {0,0,0,0,0};
27188 250 : int __pyx_lineno = 0;
27189 250 : const char *__pyx_filename = NULL;
27190 250 : int __pyx_clineno = 0;
27191 250 : PyObject *__pyx_r = 0;
27192 : __Pyx_RefNannyDeclarations
27193 250 : __Pyx_RefNannySetupContext("__pyx_fused_cpdef (wrapper)", 0);
27194 : #if CYTHON_ASSUME_SAFE_MACROS
27195 250 : __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
27196 : #else
27197 : __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
27198 : #endif
27199 250 : __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
27200 : {
27201 250 : PyObject **__pyx_pyargnames[] = {&__pyx_n_s_signatures,&__pyx_n_s_args,&__pyx_n_s_kwargs,&__pyx_n_s_defaults,&__pyx_n_s_fused_sigindex,0};
27202 250 : __pyx_defaults3 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults3, __pyx_self);
27203 250 : values[4] = __Pyx_Arg_NewRef_VARARGS(__pyx_dynamic_args->__pyx_arg__fused_sigindex);
27204 250 : if (__pyx_kwds) {
27205 0 : Py_ssize_t kw_args;
27206 0 : switch (__pyx_nargs) {
27207 0 : case 5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
27208 0 : CYTHON_FALLTHROUGH;
27209 0 : case 4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
27210 0 : CYTHON_FALLTHROUGH;
27211 0 : case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
27212 0 : CYTHON_FALLTHROUGH;
27213 0 : case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
27214 0 : CYTHON_FALLTHROUGH;
27215 0 : case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
27216 0 : CYTHON_FALLTHROUGH;
27217 0 : case 0: break;
27218 0 : default: goto __pyx_L5_argtuple_error;
27219 : }
27220 0 : kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
27221 0 : switch (__pyx_nargs) {
27222 0 : case 0:
27223 0 : if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_signatures)) != 0)) {
27224 0 : (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
27225 0 : kw_args--;
27226 : }
27227 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 369, __pyx_L3_error)
27228 0 : else goto __pyx_L5_argtuple_error;
27229 0 : CYTHON_FALLTHROUGH;
27230 : case 1:
27231 0 : if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_args)) != 0)) {
27232 0 : (void)__Pyx_Arg_NewRef_VARARGS(values[1]);
27233 0 : kw_args--;
27234 : }
27235 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 369, __pyx_L3_error)
27236 : else {
27237 0 : __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 1); __PYX_ERR(0, 369, __pyx_L3_error)
27238 : }
27239 0 : CYTHON_FALLTHROUGH;
27240 : case 2:
27241 0 : if (likely((values[2] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_kwargs)) != 0)) {
27242 0 : (void)__Pyx_Arg_NewRef_VARARGS(values[2]);
27243 0 : kw_args--;
27244 : }
27245 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 369, __pyx_L3_error)
27246 : else {
27247 0 : __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 2); __PYX_ERR(0, 369, __pyx_L3_error)
27248 : }
27249 0 : CYTHON_FALLTHROUGH;
27250 : case 3:
27251 0 : if (likely((values[3] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_defaults)) != 0)) {
27252 0 : (void)__Pyx_Arg_NewRef_VARARGS(values[3]);
27253 0 : kw_args--;
27254 : }
27255 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 369, __pyx_L3_error)
27256 : else {
27257 0 : __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 3); __PYX_ERR(0, 369, __pyx_L3_error)
27258 : }
27259 0 : CYTHON_FALLTHROUGH;
27260 : case 4:
27261 0 : if (kw_args > 0) {
27262 0 : PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fused_sigindex);
27263 0 : if (value) { values[4] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
27264 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 369, __pyx_L3_error)
27265 : }
27266 : }
27267 0 : if (unlikely(kw_args > 0)) {
27268 0 : const Py_ssize_t kwd_pos_args = __pyx_nargs;
27269 0 : if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fused_cpdef") < 0)) __PYX_ERR(0, 369, __pyx_L3_error)
27270 : }
27271 : } else {
27272 250 : switch (__pyx_nargs) {
27273 0 : case 5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
27274 250 : CYTHON_FALLTHROUGH;
27275 250 : case 4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
27276 250 : values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
27277 250 : values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
27278 250 : values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
27279 250 : break;
27280 0 : default: goto __pyx_L5_argtuple_error;
27281 : }
27282 : }
27283 250 : __pyx_v_signatures = values[0];
27284 250 : __pyx_v_args = values[1];
27285 250 : __pyx_v_kwargs = values[2];
27286 250 : __pyx_v_defaults = values[3];
27287 250 : __pyx_v__fused_sigindex = values[4];
27288 : }
27289 250 : goto __pyx_L6_skip;
27290 0 : __pyx_L5_argtuple_error:;
27291 0 : __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 369, __pyx_L3_error)
27292 250 : __pyx_L6_skip:;
27293 250 : goto __pyx_L4_argument_unpacking_done;
27294 0 : __pyx_L3_error:;
27295 : {
27296 0 : Py_ssize_t __pyx_temp;
27297 0 : for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
27298 : __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
27299 : }
27300 : }
27301 0 : __Pyx_AddTraceback("scipy.stats._sobol.__pyx_fused_cpdef", __pyx_clineno, __pyx_lineno, __pyx_filename);
27302 0 : __Pyx_RefNannyFinishContext();
27303 0 : return NULL;
27304 250 : __pyx_L4_argument_unpacking_done:;
27305 250 : __pyx_r = __pyx_pf_5scipy_5stats_6_sobol_10_cscramble(__pyx_self, __pyx_v_signatures, __pyx_v_args, __pyx_v_kwargs, __pyx_v_defaults, __pyx_v__fused_sigindex);
27306 :
27307 : /* function exit code */
27308 : {
27309 250 : Py_ssize_t __pyx_temp;
27310 250 : for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
27311 : __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
27312 : }
27313 : }
27314 : __Pyx_RefNannyFinishContext();
27315 : return __pyx_r;
27316 : }
27317 :
27318 250 : static PyObject *__pyx_pf_5scipy_5stats_6_sobol_10_cscramble(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_signatures, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, CYTHON_UNUSED PyObject *__pyx_v_defaults, PyObject *__pyx_v__fused_sigindex) {
27319 250 : PyObject *__pyx_v_search_list = 0;
27320 250 : PyObject *__pyx_v_sigindex_node = 0;
27321 250 : PyObject *__pyx_v_dest_sig = NULL;
27322 250 : PyTypeObject *__pyx_v_ndarray = 0;
27323 250 : PyObject *__pyx_v_arg_as_memoryview = 0;
27324 250 : __Pyx_memviewslice __pyx_v_memslice;
27325 250 : Py_ssize_t __pyx_v_itemsize;
27326 250 : int __pyx_v_dtype_signed;
27327 250 : Py_UCS4 __pyx_v_kind;
27328 250 : int __pyx_v___pyx_fused_dtype_uint32__t_is_signed;
27329 250 : int __pyx_v___pyx_fused_dtype_uint64__t_is_signed;
27330 250 : PyObject *__pyx_v_arg = NULL;
27331 250 : PyObject *__pyx_v_dtype = NULL;
27332 250 : PyObject *__pyx_v_arg_base = NULL;
27333 250 : PyObject *__pyx_v_sig = NULL;
27334 250 : PyObject *__pyx_v_sig_series = NULL;
27335 250 : PyObject *__pyx_v_last_type = NULL;
27336 250 : PyObject *__pyx_v_sig_type = NULL;
27337 250 : PyObject *__pyx_v_sigindex_matches = NULL;
27338 250 : PyObject *__pyx_v_sigindex_candidates = NULL;
27339 250 : PyObject *__pyx_v_dst_type = NULL;
27340 250 : PyObject *__pyx_v_found_matches = NULL;
27341 250 : PyObject *__pyx_v_found_candidates = NULL;
27342 250 : PyObject *__pyx_v_sn = NULL;
27343 250 : PyObject *__pyx_v_type_match = NULL;
27344 250 : PyObject *__pyx_v_candidates = NULL;
27345 250 : PyObject *__pyx_r = NULL;
27346 : __Pyx_RefNannyDeclarations
27347 250 : PyObject *__pyx_t_1 = NULL;
27348 250 : int __pyx_t_2;
27349 250 : int __pyx_t_3;
27350 250 : int __pyx_t_4;
27351 250 : Py_ssize_t __pyx_t_5;
27352 250 : PyObject *__pyx_t_6 = NULL;
27353 250 : long __pyx_t_7;
27354 250 : PyObject *__pyx_t_8 = NULL;
27355 250 : PyObject *__pyx_t_9 = NULL;
27356 250 : PyObject *__pyx_t_10 = NULL;
27357 250 : int __pyx_t_11;
27358 250 : __Pyx_memviewslice __pyx_t_12;
27359 250 : PyObject *__pyx_t_13 = NULL;
27360 250 : Py_ssize_t __pyx_t_14;
27361 250 : int __pyx_t_15;
27362 250 : PyObject *__pyx_t_16 = NULL;
27363 250 : PyObject *__pyx_t_17 = NULL;
27364 250 : unsigned int __pyx_t_18;
27365 250 : Py_ssize_t __pyx_t_19;
27366 250 : int __pyx_t_20;
27367 250 : int __pyx_lineno = 0;
27368 250 : const char *__pyx_filename = NULL;
27369 250 : int __pyx_clineno = 0;
27370 250 : __Pyx_RefNannySetupContext("_cscramble", 0);
27371 250 : __Pyx_INCREF(__pyx_v_kwargs);
27372 250 : __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 369, __pyx_L1_error)
27373 250 : __Pyx_GOTREF(__pyx_t_1);
27374 250 : __Pyx_INCREF(Py_None);
27375 250 : __Pyx_GIVEREF(Py_None);
27376 250 : if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, Py_None)) __PYX_ERR(0, 369, __pyx_L1_error);
27377 250 : __pyx_v_dest_sig = ((PyObject*)__pyx_t_1);
27378 250 : __pyx_t_1 = 0;
27379 250 : __pyx_t_3 = (__pyx_v_kwargs != Py_None);
27380 250 : if (__pyx_t_3) {
27381 250 : } else {
27382 0 : __pyx_t_2 = __pyx_t_3;
27383 0 : goto __pyx_L4_bool_binop_done;
27384 : }
27385 250 : __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 369, __pyx_L1_error)
27386 250 : __pyx_t_4 = (!__pyx_t_3);
27387 250 : __pyx_t_2 = __pyx_t_4;
27388 250 : __pyx_L4_bool_binop_done:;
27389 250 : if (__pyx_t_2) {
27390 0 : __Pyx_INCREF(Py_None);
27391 0 : __Pyx_DECREF_SET(__pyx_v_kwargs, Py_None);
27392 : }
27393 250 : __pyx_t_1 = ((PyObject *)__Pyx_ImportNumPyArrayTypeIfAvailable()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 369, __pyx_L1_error)
27394 250 : __Pyx_GOTREF(__pyx_t_1);
27395 250 : __pyx_v_ndarray = ((PyTypeObject*)__pyx_t_1);
27396 250 : __pyx_t_1 = 0;
27397 250 : __pyx_v_itemsize = -1L;
27398 250 : __pyx_v___pyx_fused_dtype_uint32__t_is_signed = (!(((__pyx_t_5numpy_uint32_t)-1L) > 0));
27399 250 : __pyx_v___pyx_fused_dtype_uint64__t_is_signed = (!(((__pyx_t_5numpy_uint64_t)-1L) > 0));
27400 250 : if (unlikely(__pyx_v_args == Py_None)) {
27401 0 : PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
27402 0 : __PYX_ERR(0, 369, __pyx_L1_error)
27403 : }
27404 250 : __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 369, __pyx_L1_error)
27405 250 : __pyx_t_2 = (2 < __pyx_t_5);
27406 250 : if (__pyx_t_2) {
27407 0 : if (unlikely(__pyx_v_args == Py_None)) {
27408 : PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
27409 : __PYX_ERR(0, 369, __pyx_L1_error)
27410 : }
27411 0 : __pyx_t_1 = PyTuple_GET_ITEM(((PyObject*)__pyx_v_args), 2);
27412 0 : __Pyx_INCREF(__pyx_t_1);
27413 0 : __pyx_v_arg = __pyx_t_1;
27414 0 : __pyx_t_1 = 0;
27415 0 : goto __pyx_L6;
27416 : }
27417 250 : __pyx_t_4 = (__pyx_v_kwargs != Py_None);
27418 250 : if (__pyx_t_4) {
27419 250 : } else {
27420 0 : __pyx_t_2 = __pyx_t_4;
27421 0 : goto __pyx_L7_bool_binop_done;
27422 : }
27423 250 : if (unlikely(__pyx_v_kwargs == Py_None)) {
27424 : PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
27425 : __PYX_ERR(0, 369, __pyx_L1_error)
27426 : }
27427 500 : __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_ltm, ((PyObject*)__pyx_v_kwargs), Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 369, __pyx_L1_error)
27428 : __pyx_t_2 = __pyx_t_4;
27429 250 : __pyx_L7_bool_binop_done:;
27430 250 : if (likely(__pyx_t_2)) {
27431 250 : if (unlikely(__pyx_v_kwargs == Py_None)) {
27432 0 : PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
27433 0 : __PYX_ERR(0, 369, __pyx_L1_error)
27434 : }
27435 250 : __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_kwargs), __pyx_n_s_ltm); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 369, __pyx_L1_error)
27436 250 : __Pyx_GOTREF(__pyx_t_1);
27437 250 : __pyx_v_arg = __pyx_t_1;
27438 250 : __pyx_t_1 = 0;
27439 250 : goto __pyx_L6;
27440 : }
27441 : /*else*/ {
27442 0 : if (unlikely(__pyx_v_args == Py_None)) {
27443 : PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
27444 : __PYX_ERR(0, 369, __pyx_L1_error)
27445 : }
27446 0 : __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 369, __pyx_L1_error)
27447 0 : __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 369, __pyx_L1_error)
27448 0 : __Pyx_GOTREF(__pyx_t_1);
27449 0 : __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 369, __pyx_L1_error)
27450 0 : __Pyx_GOTREF(__pyx_t_6);
27451 0 : __Pyx_INCREF(__pyx_int_4);
27452 0 : __Pyx_GIVEREF(__pyx_int_4);
27453 0 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_4)) __PYX_ERR(0, 369, __pyx_L1_error);
27454 0 : __Pyx_INCREF(__pyx_n_s_s);
27455 0 : __Pyx_GIVEREF(__pyx_n_s_s);
27456 0 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_s)) __PYX_ERR(0, 369, __pyx_L1_error);
27457 0 : __Pyx_GIVEREF(__pyx_t_1);
27458 0 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_1)) __PYX_ERR(0, 369, __pyx_L1_error);
27459 0 : __pyx_t_1 = 0;
27460 0 : __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Expected_at_least_d_argument_s_g, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 369, __pyx_L1_error)
27461 0 : __Pyx_GOTREF(__pyx_t_1);
27462 0 : __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
27463 0 : __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 369, __pyx_L1_error)
27464 0 : __Pyx_GOTREF(__pyx_t_6);
27465 0 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27466 0 : __Pyx_Raise(__pyx_t_6, 0, 0, 0);
27467 0 : __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
27468 0 : __PYX_ERR(0, 369, __pyx_L1_error)
27469 : }
27470 250 : __pyx_L6:;
27471 250 : while (1) {
27472 250 : __pyx_t_2 = (__pyx_v_ndarray != ((PyTypeObject*)Py_None));
27473 250 : if (__pyx_t_2) {
27474 250 : __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_arg, __pyx_v_ndarray);
27475 250 : if (__pyx_t_2) {
27476 250 : __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 369, __pyx_L1_error)
27477 250 : __Pyx_GOTREF(__pyx_t_6);
27478 250 : __pyx_v_dtype = __pyx_t_6;
27479 250 : __pyx_t_6 = 0;
27480 250 : goto __pyx_L12;
27481 : }
27482 0 : __pyx_t_2 = __pyx_memoryview_check(__pyx_v_arg);
27483 0 : if (__pyx_t_2) {
27484 0 : __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_base); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 369, __pyx_L1_error)
27485 0 : __Pyx_GOTREF(__pyx_t_6);
27486 0 : __pyx_v_arg_base = __pyx_t_6;
27487 0 : __pyx_t_6 = 0;
27488 0 : __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_arg_base, __pyx_v_ndarray);
27489 0 : if (__pyx_t_2) {
27490 0 : __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg_base, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 369, __pyx_L1_error)
27491 0 : __Pyx_GOTREF(__pyx_t_6);
27492 0 : __pyx_v_dtype = __pyx_t_6;
27493 0 : __pyx_t_6 = 0;
27494 0 : goto __pyx_L13;
27495 : }
27496 : /*else*/ {
27497 0 : __Pyx_INCREF(Py_None);
27498 : __pyx_v_dtype = Py_None;
27499 : }
27500 0 : __pyx_L13:;
27501 0 : goto __pyx_L12;
27502 : }
27503 : /*else*/ {
27504 0 : __Pyx_INCREF(Py_None);
27505 : __pyx_v_dtype = Py_None;
27506 : }
27507 250 : __pyx_L12:;
27508 250 : __pyx_v_itemsize = -1L;
27509 250 : __pyx_t_2 = (__pyx_v_dtype != Py_None);
27510 250 : if (__pyx_t_2) {
27511 250 : __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 369, __pyx_L1_error)
27512 250 : __Pyx_GOTREF(__pyx_t_6);
27513 250 : __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 369, __pyx_L1_error)
27514 250 : __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
27515 250 : __pyx_v_itemsize = __pyx_t_5;
27516 250 : __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 369, __pyx_L1_error)
27517 250 : __Pyx_GOTREF(__pyx_t_6);
27518 250 : __pyx_t_7 = __Pyx_PyObject_Ord(__pyx_t_6); if (unlikely(__pyx_t_7 == ((long)(long)(Py_UCS4)-1))) __PYX_ERR(0, 369, __pyx_L1_error)
27519 250 : __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
27520 250 : __pyx_v_kind = __pyx_t_7;
27521 250 : __pyx_v_dtype_signed = (__pyx_v_kind == 0x69);
27522 250 : switch (__pyx_v_kind) {
27523 250 : case 0x69:
27524 : case 0x75:
27525 250 : __pyx_t_4 = ((sizeof(__pyx_t_5numpy_uint32_t)) == __pyx_v_itemsize);
27526 250 : if (__pyx_t_4) {
27527 241 : } else {
27528 9 : __pyx_t_2 = __pyx_t_4;
27529 9 : goto __pyx_L16_bool_binop_done;
27530 : }
27531 241 : __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 369, __pyx_L1_error)
27532 241 : __Pyx_GOTREF(__pyx_t_6);
27533 241 : __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 369, __pyx_L1_error)
27534 241 : __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
27535 241 : __pyx_t_4 = (((Py_ssize_t)__pyx_t_5) == 3);
27536 241 : if (__pyx_t_4) {
27537 241 : } else {
27538 0 : __pyx_t_2 = __pyx_t_4;
27539 0 : goto __pyx_L16_bool_binop_done;
27540 : }
27541 241 : __pyx_t_4 = (!(__pyx_v___pyx_fused_dtype_uint32__t_is_signed ^ __pyx_v_dtype_signed));
27542 241 : __pyx_t_2 = __pyx_t_4;
27543 250 : __pyx_L16_bool_binop_done:;
27544 250 : if (__pyx_t_2) {
27545 241 : if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_uint32_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 369, __pyx_L1_error)
27546 241 : goto __pyx_L10_break;
27547 : }
27548 9 : __pyx_t_4 = ((sizeof(__pyx_t_5numpy_uint64_t)) == __pyx_v_itemsize);
27549 9 : if (__pyx_t_4) {
27550 9 : } else {
27551 0 : __pyx_t_2 = __pyx_t_4;
27552 0 : goto __pyx_L20_bool_binop_done;
27553 : }
27554 9 : __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 369, __pyx_L1_error)
27555 9 : __Pyx_GOTREF(__pyx_t_6);
27556 9 : __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 369, __pyx_L1_error)
27557 9 : __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
27558 9 : __pyx_t_4 = (((Py_ssize_t)__pyx_t_5) == 3);
27559 9 : if (__pyx_t_4) {
27560 9 : } else {
27561 0 : __pyx_t_2 = __pyx_t_4;
27562 0 : goto __pyx_L20_bool_binop_done;
27563 : }
27564 9 : __pyx_t_4 = (!(__pyx_v___pyx_fused_dtype_uint64__t_is_signed ^ __pyx_v_dtype_signed));
27565 9 : __pyx_t_2 = __pyx_t_4;
27566 9 : __pyx_L20_bool_binop_done:;
27567 9 : if (__pyx_t_2) {
27568 9 : if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_uint64_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 369, __pyx_L1_error)
27569 9 : goto __pyx_L10_break;
27570 : }
27571 : break;
27572 : case 0x66:
27573 : break;
27574 : case 99:
27575 : break;
27576 : case 79:
27577 : break;
27578 : default: break;
27579 : }
27580 : }
27581 : }
27582 0 : __pyx_t_2 = (__pyx_v_arg == Py_None);
27583 0 : if (__pyx_t_2) {
27584 0 : if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_uint32_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 369, __pyx_L1_error)
27585 0 : goto __pyx_L10_break;
27586 : }
27587 : {
27588 0 : __Pyx_PyThreadState_declare
27589 0 : __Pyx_PyThreadState_assign
27590 0 : __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
27591 0 : __Pyx_XGOTREF(__pyx_t_8);
27592 0 : __Pyx_XGOTREF(__pyx_t_9);
27593 0 : __Pyx_XGOTREF(__pyx_t_10);
27594 : /*try:*/ {
27595 0 : __pyx_t_6 = PyMemoryView_FromObject(__pyx_v_arg); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 369, __pyx_L24_error)
27596 0 : __Pyx_GOTREF(__pyx_t_6);
27597 0 : __pyx_v_arg_as_memoryview = ((PyObject*)__pyx_t_6);
27598 0 : __pyx_t_6 = 0;
27599 : }
27600 : /*else:*/ {
27601 0 : __pyx_t_4 = (__pyx_v_itemsize == -1L);
27602 0 : if (!__pyx_t_4) {
27603 0 : goto __pyx_L35_next_or;
27604 : } else {
27605 0 : }
27606 0 : __pyx_t_5 = __Pyx_PyMemoryView_Get_itemsize(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 369, __pyx_L26_except_error)
27607 0 : __pyx_t_4 = (__pyx_t_5 == (sizeof(__pyx_t_5numpy_uint32_t)));
27608 0 : if (!__pyx_t_4) {
27609 : } else {
27610 0 : goto __pyx_L34_next_and;
27611 : }
27612 0 : __pyx_L35_next_or:;
27613 0 : __pyx_t_4 = (__pyx_v_itemsize == (sizeof(__pyx_t_5numpy_uint32_t)));
27614 0 : if (__pyx_t_4) {
27615 : } else {
27616 0 : __pyx_t_2 = __pyx_t_4;
27617 0 : goto __pyx_L33_bool_binop_done;
27618 : }
27619 0 : __pyx_L34_next_and:;
27620 0 : __pyx_t_11 = __Pyx_PyMemoryView_Get_ndim(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 369, __pyx_L26_except_error)
27621 0 : __pyx_t_4 = (__pyx_t_11 == 3);
27622 0 : __pyx_t_2 = __pyx_t_4;
27623 0 : __pyx_L33_bool_binop_done:;
27624 0 : if (__pyx_t_2) {
27625 0 : __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_d_d_dc_nn___pyx_t_5numpy_uint32_t(__pyx_v_arg_as_memoryview, 0);
27626 0 : __pyx_v_memslice = __pyx_t_12;
27627 0 : __pyx_t_2 = (__pyx_v_memslice.memview != 0);
27628 0 : if (__pyx_t_2) {
27629 0 : __PYX_XCLEAR_MEMVIEW((&__pyx_v_memslice), 1);
27630 0 : if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_uint32_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 369, __pyx_L26_except_error)
27631 0 : goto __pyx_L29_try_break;
27632 : }
27633 : /*else*/ {
27634 0 : PyErr_Clear();
27635 : }
27636 : }
27637 0 : __pyx_t_4 = (__pyx_v_itemsize == -1L);
27638 0 : if (!__pyx_t_4) {
27639 0 : goto __pyx_L41_next_or;
27640 : } else {
27641 0 : }
27642 0 : __pyx_t_5 = __Pyx_PyMemoryView_Get_itemsize(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 369, __pyx_L26_except_error)
27643 0 : __pyx_t_4 = (__pyx_t_5 == (sizeof(__pyx_t_5numpy_uint64_t)));
27644 0 : if (!__pyx_t_4) {
27645 : } else {
27646 0 : goto __pyx_L40_next_and;
27647 : }
27648 0 : __pyx_L41_next_or:;
27649 0 : __pyx_t_4 = (__pyx_v_itemsize == (sizeof(__pyx_t_5numpy_uint64_t)));
27650 0 : if (__pyx_t_4) {
27651 : } else {
27652 0 : __pyx_t_2 = __pyx_t_4;
27653 0 : goto __pyx_L39_bool_binop_done;
27654 : }
27655 0 : __pyx_L40_next_and:;
27656 0 : __pyx_t_11 = __Pyx_PyMemoryView_Get_ndim(__pyx_v_arg_as_memoryview); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 369, __pyx_L26_except_error)
27657 0 : __pyx_t_4 = (__pyx_t_11 == 3);
27658 0 : __pyx_t_2 = __pyx_t_4;
27659 0 : __pyx_L39_bool_binop_done:;
27660 0 : if (__pyx_t_2) {
27661 0 : __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_d_d_dc_nn___pyx_t_5numpy_uint64_t(__pyx_v_arg_as_memoryview, 0);
27662 0 : __pyx_v_memslice = __pyx_t_12;
27663 0 : __pyx_t_2 = (__pyx_v_memslice.memview != 0);
27664 0 : if (__pyx_t_2) {
27665 0 : __PYX_XCLEAR_MEMVIEW((&__pyx_v_memslice), 1);
27666 0 : if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_uint64_t, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 369, __pyx_L26_except_error)
27667 0 : goto __pyx_L29_try_break;
27668 : }
27669 : /*else*/ {
27670 0 : PyErr_Clear();
27671 : }
27672 : }
27673 : }
27674 0 : __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
27675 0 : __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
27676 0 : __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
27677 0 : goto __pyx_L31_try_end;
27678 0 : __pyx_L24_error:;
27679 0 : __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
27680 0 : __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
27681 0 : __pyx_t_11 = __Pyx_PyErr_ExceptionMatches2(__pyx_builtin_ValueError, __pyx_builtin_TypeError);
27682 0 : if (__pyx_t_11) {
27683 0 : __Pyx_AddTraceback("scipy.stats._sobol.__pyx_fused_cpdef", __pyx_clineno, __pyx_lineno, __pyx_filename);
27684 0 : if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_1, &__pyx_t_13) < 0) __PYX_ERR(0, 369, __pyx_L26_except_error)
27685 0 : __Pyx_XGOTREF(__pyx_t_6);
27686 0 : __Pyx_XGOTREF(__pyx_t_1);
27687 0 : __Pyx_XGOTREF(__pyx_t_13);
27688 0 : __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
27689 0 : __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
27690 0 : __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
27691 0 : goto __pyx_L25_exception_handled;
27692 : }
27693 0 : goto __pyx_L26_except_error;
27694 0 : __pyx_L26_except_error:;
27695 0 : __Pyx_XGIVEREF(__pyx_t_8);
27696 0 : __Pyx_XGIVEREF(__pyx_t_9);
27697 0 : __Pyx_XGIVEREF(__pyx_t_10);
27698 0 : __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
27699 0 : goto __pyx_L1_error;
27700 0 : __pyx_L29_try_break:;
27701 0 : __Pyx_XGIVEREF(__pyx_t_8);
27702 0 : __Pyx_XGIVEREF(__pyx_t_9);
27703 0 : __Pyx_XGIVEREF(__pyx_t_10);
27704 0 : __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
27705 0 : goto __pyx_L10_break;
27706 0 : __pyx_L25_exception_handled:;
27707 0 : __Pyx_XGIVEREF(__pyx_t_8);
27708 0 : __Pyx_XGIVEREF(__pyx_t_9);
27709 0 : __Pyx_XGIVEREF(__pyx_t_10);
27710 0 : __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
27711 0 : __pyx_L31_try_end:;
27712 : }
27713 0 : if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 369, __pyx_L1_error)
27714 0 : goto __pyx_L10_break;
27715 : }
27716 250 : __pyx_L10_break:;
27717 250 : __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v__fused_sigindex); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 369, __pyx_L1_error)
27718 250 : __pyx_t_4 = (!__pyx_t_2);
27719 250 : if (__pyx_t_4) {
27720 3 : __pyx_t_5 = 0;
27721 3 : if (unlikely(__pyx_v_signatures == Py_None)) {
27722 0 : PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
27723 0 : __PYX_ERR(0, 369, __pyx_L1_error)
27724 : }
27725 6 : __pyx_t_1 = __Pyx_dict_iterator(((PyObject*)__pyx_v_signatures), 1, ((PyObject *)NULL), (&__pyx_t_14), (&__pyx_t_11)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 369, __pyx_L1_error)
27726 3 : __Pyx_GOTREF(__pyx_t_1);
27727 3 : __Pyx_XDECREF(__pyx_t_13);
27728 3 : __pyx_t_13 = __pyx_t_1;
27729 3 : __pyx_t_1 = 0;
27730 9 : while (1) {
27731 9 : __pyx_t_15 = __Pyx_dict_iter_next(__pyx_t_13, __pyx_t_14, &__pyx_t_5, &__pyx_t_1, NULL, NULL, __pyx_t_11);
27732 9 : if (unlikely(__pyx_t_15 == 0)) break;
27733 6 : if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 369, __pyx_L1_error)
27734 6 : __Pyx_GOTREF(__pyx_t_1);
27735 6 : __Pyx_XDECREF_SET(__pyx_v_sig, __pyx_t_1);
27736 6 : __pyx_t_1 = 0;
27737 6 : __pyx_t_1 = __pyx_v__fused_sigindex;
27738 6 : __Pyx_INCREF(__pyx_t_1);
27739 6 : __Pyx_XDECREF_SET(__pyx_v_sigindex_node, ((PyObject*)__pyx_t_1));
27740 6 : __pyx_t_1 = 0;
27741 6 : __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_strip); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 369, __pyx_L1_error)
27742 6 : __Pyx_GOTREF(__pyx_t_16);
27743 6 : __pyx_t_17 = NULL;
27744 6 : __pyx_t_18 = 0;
27745 : #if CYTHON_UNPACK_METHODS
27746 6 : if (likely(PyMethod_Check(__pyx_t_16))) {
27747 0 : __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_16);
27748 0 : if (likely(__pyx_t_17)) {
27749 0 : PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
27750 0 : __Pyx_INCREF(__pyx_t_17);
27751 0 : __Pyx_INCREF(function);
27752 0 : __Pyx_DECREF_SET(__pyx_t_16, function);
27753 : __pyx_t_18 = 1;
27754 : }
27755 : }
27756 : #endif
27757 : {
27758 6 : PyObject *__pyx_callargs[2] = {__pyx_t_17, __pyx_kp_s__16};
27759 6 : __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_18, 1+__pyx_t_18);
27760 6 : __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
27761 6 : if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 369, __pyx_L1_error)
27762 6 : __Pyx_GOTREF(__pyx_t_6);
27763 6 : __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
27764 : }
27765 6 : __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_split); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 369, __pyx_L1_error)
27766 6 : __Pyx_GOTREF(__pyx_t_16);
27767 6 : __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
27768 6 : __pyx_t_6 = NULL;
27769 6 : __pyx_t_18 = 0;
27770 : #if CYTHON_UNPACK_METHODS
27771 6 : if (likely(PyMethod_Check(__pyx_t_16))) {
27772 0 : __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_16);
27773 0 : if (likely(__pyx_t_6)) {
27774 0 : PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
27775 0 : __Pyx_INCREF(__pyx_t_6);
27776 0 : __Pyx_INCREF(function);
27777 0 : __Pyx_DECREF_SET(__pyx_t_16, function);
27778 : __pyx_t_18 = 1;
27779 : }
27780 : }
27781 : #endif
27782 : {
27783 6 : PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_kp_s__17};
27784 6 : __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_18, 1+__pyx_t_18);
27785 6 : __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
27786 6 : if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 369, __pyx_L1_error)
27787 6 : __Pyx_GOTREF(__pyx_t_1);
27788 6 : __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
27789 : }
27790 12 : __pyx_t_16 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 369, __pyx_L1_error)
27791 6 : __Pyx_GOTREF(__pyx_t_16);
27792 6 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27793 6 : __pyx_t_19 = PyList_GET_SIZE(__pyx_t_16);
27794 6 : if (unlikely(__pyx_t_19 < 1)) {
27795 0 : __Pyx_RaiseNeedMoreValuesError(0+__pyx_t_19); __PYX_ERR(0, 369, __pyx_L1_error)
27796 : }
27797 : #if CYTHON_COMPILING_IN_CPYTHON
27798 6 : __pyx_t_6 = PyList_GET_ITEM(__pyx_t_16, __pyx_t_19-1);
27799 6 : ((PyVarObject*)__pyx_t_16)->ob_size--;
27800 : #else
27801 : __pyx_t_6 = PySequence_ITEM(__pyx_t_16, __pyx_t_19-1);
27802 : #endif
27803 6 : __Pyx_GOTREF(__pyx_t_6);
27804 : #if !CYTHON_COMPILING_IN_CPYTHON
27805 : __pyx_t_17 = PySequence_GetSlice(__pyx_t_16, 0, __pyx_t_19-1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 369, __pyx_L1_error)
27806 : __Pyx_GOTREF(__pyx_t_17);
27807 : __Pyx_DECREF(__pyx_t_16);
27808 : __pyx_t_16 = __pyx_t_17; __pyx_t_17 = NULL;
27809 : #else
27810 6 : CYTHON_UNUSED_VAR(__pyx_t_17);
27811 : #endif
27812 6 : __Pyx_XDECREF_SET(__pyx_v_sig_series, ((PyObject*)__pyx_t_16));
27813 6 : __pyx_t_16 = 0;
27814 6 : __Pyx_XDECREF_SET(__pyx_v_last_type, __pyx_t_6);
27815 6 : __pyx_t_6 = 0;
27816 6 : __pyx_t_1 = __pyx_v_sig_series; __Pyx_INCREF(__pyx_t_1);
27817 : __pyx_t_19 = 0;
27818 6 : for (;;) {
27819 : {
27820 6 : Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
27821 : #if !CYTHON_ASSUME_SAFE_MACROS
27822 : if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 369, __pyx_L1_error)
27823 : #endif
27824 6 : if (__pyx_t_19 >= __pyx_temp) break;
27825 : }
27826 : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
27827 0 : __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_19); __Pyx_INCREF(__pyx_t_6); __pyx_t_19++; if (unlikely((0 < 0))) __PYX_ERR(0, 369, __pyx_L1_error)
27828 : #else
27829 : __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_19); __pyx_t_19++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 369, __pyx_L1_error)
27830 : __Pyx_GOTREF(__pyx_t_6);
27831 : #endif
27832 0 : __Pyx_XDECREF_SET(__pyx_v_sig_type, __pyx_t_6);
27833 0 : __pyx_t_6 = 0;
27834 0 : if (unlikely(__pyx_v_sigindex_node == Py_None)) {
27835 0 : PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
27836 0 : __PYX_ERR(0, 369, __pyx_L1_error)
27837 : }
27838 0 : __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_v_sig_type, __pyx_v_sigindex_node, Py_NE)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 369, __pyx_L1_error)
27839 0 : if (__pyx_t_4) {
27840 0 : __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 369, __pyx_L1_error)
27841 0 : __Pyx_GOTREF(__pyx_t_6);
27842 0 : if (unlikely(__pyx_v_sigindex_node == Py_None)) {
27843 : PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
27844 : __PYX_ERR(0, 369, __pyx_L1_error)
27845 : }
27846 0 : if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_sig_type, __pyx_t_6) < 0))) __PYX_ERR(0, 369, __pyx_L1_error)
27847 0 : __Pyx_INCREF(__pyx_t_6);
27848 0 : __Pyx_DECREF_SET(__pyx_v_sigindex_node, __pyx_t_6);
27849 0 : __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
27850 0 : goto __pyx_L51;
27851 : }
27852 : /*else*/ {
27853 0 : if (unlikely(__pyx_v_sigindex_node == Py_None)) {
27854 : PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
27855 : __PYX_ERR(0, 369, __pyx_L1_error)
27856 : }
27857 0 : __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_sigindex_node, __pyx_v_sig_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 369, __pyx_L1_error)
27858 0 : __Pyx_GOTREF(__pyx_t_6);
27859 0 : __pyx_t_16 = __pyx_t_6;
27860 0 : __Pyx_INCREF(__pyx_t_16);
27861 0 : __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
27862 6 : __Pyx_DECREF_SET(__pyx_v_sigindex_node, ((PyObject*)__pyx_t_16));
27863 : __pyx_t_16 = 0;
27864 : }
27865 : __pyx_L51:;
27866 : }
27867 6 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27868 6 : if (unlikely(__pyx_v_sigindex_node == Py_None)) {
27869 0 : PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
27870 0 : __PYX_ERR(0, 369, __pyx_L1_error)
27871 : }
27872 6 : if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_last_type, __pyx_v_sig) < 0))) __PYX_ERR(0, 369, __pyx_L1_error)
27873 : }
27874 6 : __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
27875 : }
27876 250 : __pyx_t_13 = PyList_New(0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 369, __pyx_L1_error)
27877 250 : __Pyx_GOTREF(__pyx_t_13);
27878 250 : __pyx_v_sigindex_matches = ((PyObject*)__pyx_t_13);
27879 250 : __pyx_t_13 = 0;
27880 250 : __pyx_t_13 = PyList_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 369, __pyx_L1_error)
27881 250 : __Pyx_GOTREF(__pyx_t_13);
27882 250 : __Pyx_INCREF(__pyx_v__fused_sigindex);
27883 250 : __Pyx_GIVEREF(__pyx_v__fused_sigindex);
27884 250 : if (__Pyx_PyList_SET_ITEM(__pyx_t_13, 0, __pyx_v__fused_sigindex)) __PYX_ERR(0, 369, __pyx_L1_error);
27885 250 : __pyx_v_sigindex_candidates = ((PyObject*)__pyx_t_13);
27886 250 : __pyx_t_13 = 0;
27887 250 : __pyx_t_13 = __pyx_v_dest_sig; __Pyx_INCREF(__pyx_t_13);
27888 : __pyx_t_14 = 0;
27889 500 : for (;;) {
27890 : {
27891 500 : Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_13);
27892 : #if !CYTHON_ASSUME_SAFE_MACROS
27893 : if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 369, __pyx_L1_error)
27894 : #endif
27895 500 : if (__pyx_t_14 >= __pyx_temp) break;
27896 : }
27897 : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
27898 250 : __pyx_t_1 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_14); __Pyx_INCREF(__pyx_t_1); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(0, 369, __pyx_L1_error)
27899 : #else
27900 : __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_13, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 369, __pyx_L1_error)
27901 : __Pyx_GOTREF(__pyx_t_1);
27902 : #endif
27903 250 : __Pyx_XDECREF_SET(__pyx_v_dst_type, __pyx_t_1);
27904 250 : __pyx_t_1 = 0;
27905 250 : __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 369, __pyx_L1_error)
27906 250 : __Pyx_GOTREF(__pyx_t_1);
27907 250 : __Pyx_XDECREF_SET(__pyx_v_found_matches, ((PyObject*)__pyx_t_1));
27908 250 : __pyx_t_1 = 0;
27909 250 : __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 369, __pyx_L1_error)
27910 250 : __Pyx_GOTREF(__pyx_t_1);
27911 250 : __Pyx_XDECREF_SET(__pyx_v_found_candidates, ((PyObject*)__pyx_t_1));
27912 250 : __pyx_t_1 = 0;
27913 250 : __pyx_t_4 = (__pyx_v_dst_type == Py_None);
27914 250 : if (__pyx_t_4) {
27915 0 : __pyx_t_1 = __pyx_v_sigindex_matches; __Pyx_INCREF(__pyx_t_1);
27916 0 : __pyx_t_5 = 0;
27917 0 : for (;;) {
27918 : {
27919 0 : Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
27920 : #if !CYTHON_ASSUME_SAFE_MACROS
27921 : if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 369, __pyx_L1_error)
27922 : #endif
27923 0 : if (__pyx_t_5 >= __pyx_temp) break;
27924 : }
27925 : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
27926 0 : __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 369, __pyx_L1_error)
27927 : #else
27928 : __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 369, __pyx_L1_error)
27929 : __Pyx_GOTREF(__pyx_t_16);
27930 : #endif
27931 0 : __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_16);
27932 0 : __pyx_t_16 = 0;
27933 0 : if (unlikely(__pyx_v_sn == Py_None)) {
27934 0 : PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values");
27935 0 : __PYX_ERR(0, 369, __pyx_L1_error)
27936 : }
27937 0 : __pyx_t_16 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 369, __pyx_L1_error)
27938 0 : __Pyx_GOTREF(__pyx_t_16);
27939 0 : __pyx_t_20 = __Pyx_PyList_Extend(__pyx_v_found_matches, __pyx_t_16); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 369, __pyx_L1_error)
27940 0 : __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
27941 : }
27942 0 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27943 0 : __pyx_t_1 = __pyx_v_sigindex_candidates; __Pyx_INCREF(__pyx_t_1);
27944 0 : __pyx_t_5 = 0;
27945 0 : for (;;) {
27946 : {
27947 0 : Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
27948 : #if !CYTHON_ASSUME_SAFE_MACROS
27949 : if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 369, __pyx_L1_error)
27950 : #endif
27951 0 : if (__pyx_t_5 >= __pyx_temp) break;
27952 : }
27953 : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
27954 0 : __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 369, __pyx_L1_error)
27955 : #else
27956 : __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 369, __pyx_L1_error)
27957 : __Pyx_GOTREF(__pyx_t_16);
27958 : #endif
27959 0 : __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_16);
27960 0 : __pyx_t_16 = 0;
27961 0 : if (unlikely(__pyx_v_sn == Py_None)) {
27962 0 : PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values");
27963 0 : __PYX_ERR(0, 369, __pyx_L1_error)
27964 : }
27965 0 : __pyx_t_16 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 369, __pyx_L1_error)
27966 0 : __Pyx_GOTREF(__pyx_t_16);
27967 0 : __pyx_t_20 = __Pyx_PyList_Extend(__pyx_v_found_candidates, __pyx_t_16); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 369, __pyx_L1_error)
27968 0 : __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
27969 : }
27970 0 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27971 0 : goto __pyx_L55;
27972 : }
27973 : /*else*/ {
27974 250 : __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 369, __pyx_L1_error)
27975 250 : __Pyx_GOTREF(__pyx_t_1);
27976 250 : __Pyx_INCREF(__pyx_v_sigindex_matches);
27977 250 : __Pyx_GIVEREF(__pyx_v_sigindex_matches);
27978 250 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_sigindex_matches)) __PYX_ERR(0, 369, __pyx_L1_error);
27979 250 : __Pyx_INCREF(__pyx_v_sigindex_candidates);
27980 250 : __Pyx_GIVEREF(__pyx_v_sigindex_candidates);
27981 250 : if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_sigindex_candidates)) __PYX_ERR(0, 369, __pyx_L1_error);
27982 250 : __pyx_t_16 = __pyx_t_1; __Pyx_INCREF(__pyx_t_16);
27983 250 : __pyx_t_5 = 0;
27984 500 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27985 1250 : for (;;) {
27986 750 : if (__pyx_t_5 >= 2) break;
27987 : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
27988 500 : __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_16, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 369, __pyx_L1_error)
27989 : #else
27990 : __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_16, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 369, __pyx_L1_error)
27991 : __Pyx_GOTREF(__pyx_t_1);
27992 : #endif
27993 500 : __Pyx_XDECREF_SET(__pyx_v_search_list, ((PyObject*)__pyx_t_1));
27994 500 : __pyx_t_1 = 0;
27995 500 : if (unlikely(__pyx_v_search_list == Py_None)) {
27996 0 : PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
27997 0 : __PYX_ERR(0, 369, __pyx_L1_error)
27998 : }
27999 500 : __pyx_t_1 = __pyx_v_search_list; __Pyx_INCREF(__pyx_t_1);
28000 : __pyx_t_19 = 0;
28001 750 : for (;;) {
28002 : {
28003 750 : Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
28004 : #if !CYTHON_ASSUME_SAFE_MACROS
28005 : if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 369, __pyx_L1_error)
28006 : #endif
28007 750 : if (__pyx_t_19 >= __pyx_temp) break;
28008 : }
28009 : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
28010 250 : __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_19); __Pyx_INCREF(__pyx_t_6); __pyx_t_19++; if (unlikely((0 < 0))) __PYX_ERR(0, 369, __pyx_L1_error)
28011 : #else
28012 : __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_19); __pyx_t_19++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 369, __pyx_L1_error)
28013 : __Pyx_GOTREF(__pyx_t_6);
28014 : #endif
28015 250 : __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_6);
28016 250 : __pyx_t_6 = 0;
28017 250 : if (unlikely(__pyx_v_sn == Py_None)) {
28018 0 : PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
28019 0 : __PYX_ERR(0, 369, __pyx_L1_error)
28020 : }
28021 250 : __pyx_t_6 = __Pyx_PyDict_GetItemDefault(((PyObject*)__pyx_v_sn), __pyx_v_dst_type, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 369, __pyx_L1_error)
28022 250 : __Pyx_GOTREF(__pyx_t_6);
28023 250 : __Pyx_XDECREF_SET(__pyx_v_type_match, __pyx_t_6);
28024 250 : __pyx_t_6 = 0;
28025 250 : __pyx_t_4 = (__pyx_v_type_match != Py_None);
28026 250 : if (__pyx_t_4) {
28027 250 : __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_found_matches, __pyx_v_type_match); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 369, __pyx_L1_error)
28028 : }
28029 : }
28030 1000 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
28031 : }
28032 250 : __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
28033 : }
28034 250 : __pyx_L55:;
28035 250 : __Pyx_INCREF(__pyx_v_found_matches);
28036 250 : __Pyx_DECREF_SET(__pyx_v_sigindex_matches, __pyx_v_found_matches);
28037 250 : __Pyx_INCREF(__pyx_v_found_candidates);
28038 250 : __Pyx_DECREF_SET(__pyx_v_sigindex_candidates, __pyx_v_found_candidates);
28039 250 : __pyx_t_2 = (PyList_GET_SIZE(__pyx_v_found_matches) != 0);
28040 250 : if (!__pyx_t_2) {
28041 0 : } else {
28042 250 : __pyx_t_4 = __pyx_t_2;
28043 250 : goto __pyx_L70_bool_binop_done;
28044 : }
28045 0 : __pyx_t_2 = (PyList_GET_SIZE(__pyx_v_found_candidates) != 0);
28046 0 : __pyx_t_4 = __pyx_t_2;
28047 250 : __pyx_L70_bool_binop_done:;
28048 250 : __pyx_t_2 = (!__pyx_t_4);
28049 250 : if (__pyx_t_2) {
28050 0 : goto __pyx_L54_break;
28051 : }
28052 : }
28053 250 : __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
28054 250 : goto __pyx_L72_for_end;
28055 0 : __pyx_L54_break:;
28056 0 : __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
28057 0 : goto __pyx_L72_for_end;
28058 250 : __pyx_L72_for_end:;
28059 250 : __Pyx_INCREF(__pyx_v_sigindex_matches);
28060 250 : __pyx_v_candidates = __pyx_v_sigindex_matches;
28061 250 : __pyx_t_2 = (PyList_GET_SIZE(__pyx_v_candidates) != 0);
28062 250 : __pyx_t_4 = (!__pyx_t_2);
28063 250 : if (unlikely(__pyx_t_4)) {
28064 0 : __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 369, __pyx_L1_error)
28065 0 : __Pyx_GOTREF(__pyx_t_13);
28066 0 : __Pyx_Raise(__pyx_t_13, 0, 0, 0);
28067 0 : __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
28068 0 : __PYX_ERR(0, 369, __pyx_L1_error)
28069 : }
28070 250 : __pyx_t_14 = __Pyx_PyList_GET_SIZE(__pyx_v_candidates); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 369, __pyx_L1_error)
28071 250 : __pyx_t_4 = (__pyx_t_14 > 1);
28072 250 : if (unlikely(__pyx_t_4)) {
28073 0 : __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 369, __pyx_L1_error)
28074 0 : __Pyx_GOTREF(__pyx_t_13);
28075 0 : __Pyx_Raise(__pyx_t_13, 0, 0, 0);
28076 0 : __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
28077 0 : __PYX_ERR(0, 369, __pyx_L1_error)
28078 : }
28079 : /*else*/ {
28080 250 : __Pyx_XDECREF(__pyx_r);
28081 250 : if (unlikely(__pyx_v_signatures == Py_None)) {
28082 0 : PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
28083 0 : __PYX_ERR(0, 369, __pyx_L1_error)
28084 : }
28085 250 : __pyx_t_13 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_signatures), PyList_GET_ITEM(__pyx_v_candidates, 0)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 369, __pyx_L1_error)
28086 250 : __Pyx_GOTREF(__pyx_t_13);
28087 250 : __pyx_r = __pyx_t_13;
28088 250 : __pyx_t_13 = 0;
28089 250 : goto __pyx_L0;
28090 : }
28091 :
28092 : /* function exit code */
28093 0 : __pyx_L1_error:;
28094 0 : __Pyx_XDECREF(__pyx_t_1);
28095 0 : __Pyx_XDECREF(__pyx_t_6);
28096 0 : __Pyx_XDECREF(__pyx_t_13);
28097 0 : __Pyx_XDECREF(__pyx_t_16);
28098 0 : __Pyx_XDECREF(__pyx_t_17);
28099 0 : __Pyx_AddTraceback("scipy.stats._sobol.__pyx_fused_cpdef", __pyx_clineno, __pyx_lineno, __pyx_filename);
28100 0 : __pyx_r = NULL;
28101 250 : __pyx_L0:;
28102 250 : __Pyx_XDECREF(__pyx_v_search_list);
28103 250 : __Pyx_XDECREF(__pyx_v_sigindex_node);
28104 250 : __Pyx_XDECREF(__pyx_v_dest_sig);
28105 250 : __Pyx_XDECREF((PyObject *)__pyx_v_ndarray);
28106 250 : __Pyx_XDECREF(__pyx_v_arg_as_memoryview);
28107 250 : __Pyx_XDECREF(__pyx_v_arg);
28108 250 : __Pyx_XDECREF(__pyx_v_dtype);
28109 250 : __Pyx_XDECREF(__pyx_v_arg_base);
28110 250 : __Pyx_XDECREF(__pyx_v_sig);
28111 250 : __Pyx_XDECREF(__pyx_v_sig_series);
28112 250 : __Pyx_XDECREF(__pyx_v_last_type);
28113 250 : __Pyx_XDECREF(__pyx_v_sig_type);
28114 250 : __Pyx_XDECREF(__pyx_v_sigindex_matches);
28115 250 : __Pyx_XDECREF(__pyx_v_sigindex_candidates);
28116 250 : __Pyx_XDECREF(__pyx_v_dst_type);
28117 250 : __Pyx_XDECREF(__pyx_v_found_matches);
28118 250 : __Pyx_XDECREF(__pyx_v_found_candidates);
28119 250 : __Pyx_XDECREF(__pyx_v_sn);
28120 250 : __Pyx_XDECREF(__pyx_v_type_match);
28121 250 : __Pyx_XDECREF(__pyx_v_candidates);
28122 250 : __Pyx_XDECREF(__pyx_v_kwargs);
28123 250 : __Pyx_XGIVEREF(__pyx_r);
28124 250 : __Pyx_RefNannyFinishContext();
28125 250 : return __pyx_r;
28126 : }
28127 :
28128 : static PyObject *__pyx_pw_5scipy_5stats_6_sobol_37__pyx_fuse_0_cscramble(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
28129 : static PyObject *__pyx_pw_5scipy_5stats_6_sobol_11_cscramble(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
28130 241 : static void __pyx_fuse_0__pyx_f_5scipy_5stats_6_sobol__cscramble(int const __pyx_v_dim, int const __pyx_v_bits, __Pyx_memviewslice __pyx_v_ltm, __Pyx_memviewslice __pyx_v_sv, CYTHON_UNUSED int __pyx_skip_dispatch) {
28131 241 : int __pyx_v_d;
28132 241 : int __pyx_v_i;
28133 241 : int __pyx_v_j;
28134 241 : int __pyx_v_k;
28135 241 : int __pyx_v_p;
28136 241 : __pyx_t_5numpy_uint32_t __pyx_v_l;
28137 241 : __pyx_t_5numpy_uint32_t __pyx_v_lsmdp;
28138 241 : __pyx_t_5numpy_uint32_t __pyx_v_t1;
28139 241 : __pyx_t_5numpy_uint32_t __pyx_v_t2;
28140 241 : __pyx_t_5numpy_uint32_t __pyx_v_vdj;
28141 241 : int __pyx_t_1;
28142 241 : int __pyx_t_2;
28143 241 : int __pyx_t_3;
28144 241 : int __pyx_t_4;
28145 241 : int __pyx_t_5;
28146 241 : int __pyx_t_6;
28147 241 : Py_ssize_t __pyx_t_7;
28148 241 : Py_ssize_t __pyx_t_8;
28149 241 : Py_ssize_t __pyx_t_9;
28150 241 : int __pyx_t_10;
28151 241 : __Pyx_memviewslice __pyx_t_11 = { 0, 0, { 0 }, { 0 }, { 0 } };
28152 241 : int __pyx_t_12;
28153 241 : int __pyx_t_13;
28154 241 : int __pyx_t_14;
28155 :
28156 : /* "scipy/stats/_sobol.pyx":378
28157 : *
28158 : * # Set diagonals of bits x bits arrays to 1
28159 : * for d in range(dim): # <<<<<<<<<<<<<<
28160 : * for i in range(bits):
28161 : * ltm[d, i, i] = 1
28162 : */
28163 241 : __pyx_t_1 = __pyx_v_dim;
28164 241 : __pyx_t_2 = __pyx_t_1;
28165 860 : for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
28166 : __pyx_v_d = __pyx_t_3;
28167 :
28168 : /* "scipy/stats/_sobol.pyx":379
28169 : * # Set diagonals of bits x bits arrays to 1
28170 : * for d in range(dim):
28171 : * for i in range(bits): # <<<<<<<<<<<<<<
28172 : * ltm[d, i, i] = 1
28173 : *
28174 : */
28175 : __pyx_t_4 = __pyx_v_bits;
28176 : __pyx_t_5 = __pyx_t_4;
28177 19189 : for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
28178 18570 : __pyx_v_i = __pyx_t_6;
28179 :
28180 : /* "scipy/stats/_sobol.pyx":380
28181 : * for d in range(dim):
28182 : * for i in range(bits):
28183 : * ltm[d, i, i] = 1 # <<<<<<<<<<<<<<
28184 : *
28185 : * for d in range(dim):
28186 : */
28187 18570 : __pyx_t_7 = __pyx_v_d;
28188 18570 : __pyx_t_8 = __pyx_v_i;
28189 18570 : __pyx_t_9 = __pyx_v_i;
28190 18570 : *((__pyx_t_5numpy_uint32_t *) ( /* dim=2 */ ((char *) (((__pyx_t_5numpy_uint32_t *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_ltm.data + __pyx_t_7 * __pyx_v_ltm.strides[0]) ) + __pyx_t_8 * __pyx_v_ltm.strides[1]) )) + __pyx_t_9)) )) = 1;
28191 : }
28192 : }
28193 :
28194 : /* "scipy/stats/_sobol.pyx":382
28195 : * ltm[d, i, i] = 1
28196 : *
28197 : * for d in range(dim): # <<<<<<<<<<<<<<
28198 : * for j in range(bits):
28199 : * vdj = sv[d, j]
28200 : */
28201 860 : __pyx_t_1 = __pyx_v_dim;
28202 860 : __pyx_t_2 = __pyx_t_1;
28203 860 : for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
28204 : __pyx_v_d = __pyx_t_3;
28205 :
28206 : /* "scipy/stats/_sobol.pyx":383
28207 : *
28208 : * for d in range(dim):
28209 : * for j in range(bits): # <<<<<<<<<<<<<<
28210 : * vdj = sv[d, j]
28211 : * l = 1
28212 : */
28213 : __pyx_t_4 = __pyx_v_bits;
28214 : __pyx_t_5 = __pyx_t_4;
28215 19189 : for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
28216 18570 : __pyx_v_j = __pyx_t_6;
28217 :
28218 : /* "scipy/stats/_sobol.pyx":384
28219 : * for d in range(dim):
28220 : * for j in range(bits):
28221 : * vdj = sv[d, j] # <<<<<<<<<<<<<<
28222 : * l = 1
28223 : * t2 = 0
28224 : */
28225 18570 : __pyx_t_9 = __pyx_v_d;
28226 18570 : __pyx_t_8 = __pyx_v_j;
28227 18570 : __pyx_v_vdj = (*((__pyx_t_5numpy_uint32_t *) ( /* dim=1 */ ((char *) (((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_sv.data + __pyx_t_9 * __pyx_v_sv.strides[0]) )) + __pyx_t_8)) )));
28228 :
28229 : /* "scipy/stats/_sobol.pyx":385
28230 : * for j in range(bits):
28231 : * vdj = sv[d, j]
28232 : * l = 1 # <<<<<<<<<<<<<<
28233 : * t2 = 0
28234 : * for p in range(bits - 1, -1, -1):
28235 : */
28236 18570 : __pyx_v_l = 1;
28237 :
28238 : /* "scipy/stats/_sobol.pyx":386
28239 : * vdj = sv[d, j]
28240 : * l = 1
28241 : * t2 = 0 # <<<<<<<<<<<<<<
28242 : * for p in range(bits - 1, -1, -1):
28243 : * lsmdp = cdot_pow2(ltm[d, p, :])
28244 : */
28245 18570 : __pyx_v_t2 = 0;
28246 :
28247 : /* "scipy/stats/_sobol.pyx":387
28248 : * l = 1
28249 : * t2 = 0
28250 : * for p in range(bits - 1, -1, -1): # <<<<<<<<<<<<<<
28251 : * lsmdp = cdot_pow2(ltm[d, p, :])
28252 : * t1 = 0
28253 : */
28254 575670 : for (__pyx_t_10 = (__pyx_v_bits - 1); __pyx_t_10 > -1; __pyx_t_10-=1) {
28255 557100 : __pyx_v_p = __pyx_t_10;
28256 :
28257 : /* "scipy/stats/_sobol.pyx":388
28258 : * t2 = 0
28259 : * for p in range(bits - 1, -1, -1):
28260 : * lsmdp = cdot_pow2(ltm[d, p, :]) # <<<<<<<<<<<<<<
28261 : * t1 = 0
28262 : * for k in range(bits):
28263 : */
28264 557100 : __pyx_t_11.data = __pyx_v_ltm.data;
28265 557100 : __pyx_t_11.memview = __pyx_v_ltm.memview;
28266 557100 : __PYX_INC_MEMVIEW(&__pyx_t_11, 0);
28267 : {
28268 557100 : Py_ssize_t __pyx_tmp_idx = __pyx_v_d;
28269 557100 : Py_ssize_t __pyx_tmp_stride = __pyx_v_ltm.strides[0];
28270 557100 : __pyx_t_11.data += __pyx_tmp_idx * __pyx_tmp_stride;
28271 : }
28272 :
28273 : {
28274 557100 : Py_ssize_t __pyx_tmp_idx = __pyx_v_p;
28275 557100 : Py_ssize_t __pyx_tmp_stride = __pyx_v_ltm.strides[1];
28276 557100 : __pyx_t_11.data += __pyx_tmp_idx * __pyx_tmp_stride;
28277 : }
28278 :
28279 557100 : __pyx_t_11.shape[0] = __pyx_v_ltm.shape[2];
28280 557100 : __pyx_t_11.strides[0] = __pyx_v_ltm.strides[2];
28281 557100 : __pyx_t_11.suboffsets[0] = -1;
28282 :
28283 557100 : __pyx_v_lsmdp = __pyx_fuse_0__pyx_f_5scipy_5stats_6_sobol_cdot_pow2(__pyx_t_11);
28284 557100 : __PYX_XCLEAR_MEMVIEW(&__pyx_t_11, 0);
28285 557100 : __pyx_t_11.memview = NULL; __pyx_t_11.data = NULL;
28286 :
28287 : /* "scipy/stats/_sobol.pyx":389
28288 : * for p in range(bits - 1, -1, -1):
28289 : * lsmdp = cdot_pow2(ltm[d, p, :])
28290 : * t1 = 0 # <<<<<<<<<<<<<<
28291 : * for k in range(bits):
28292 : * t1 += ibits(lsmdp, k, 1) * ibits(vdj, k, 1)
28293 : */
28294 557100 : __pyx_v_t1 = 0;
28295 :
28296 : /* "scipy/stats/_sobol.pyx":390
28297 : * lsmdp = cdot_pow2(ltm[d, p, :])
28298 : * t1 = 0
28299 : * for k in range(bits): # <<<<<<<<<<<<<<
28300 : * t1 += ibits(lsmdp, k, 1) * ibits(vdj, k, 1)
28301 : * t1 = t1 % 2
28302 : */
28303 557100 : __pyx_t_12 = __pyx_v_bits;
28304 557100 : __pyx_t_13 = __pyx_t_12;
28305 17270100 : for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) {
28306 16713000 : __pyx_v_k = __pyx_t_14;
28307 :
28308 : /* "scipy/stats/_sobol.pyx":391
28309 : * t1 = 0
28310 : * for k in range(bits):
28311 : * t1 += ibits(lsmdp, k, 1) * ibits(vdj, k, 1) # <<<<<<<<<<<<<<
28312 : * t1 = t1 % 2
28313 : * t2 = t2 + t1 * l
28314 : */
28315 16713000 : __pyx_v_t1 = (__pyx_v_t1 + (__pyx_fuse_0__pyx_f_5scipy_5stats_6_sobol_ibits(__pyx_v_lsmdp, __pyx_v_k, 1) * __pyx_fuse_0__pyx_f_5scipy_5stats_6_sobol_ibits(__pyx_v_vdj, __pyx_v_k, 1)));
28316 : }
28317 :
28318 : /* "scipy/stats/_sobol.pyx":392
28319 : * for k in range(bits):
28320 : * t1 += ibits(lsmdp, k, 1) * ibits(vdj, k, 1)
28321 : * t1 = t1 % 2 # <<<<<<<<<<<<<<
28322 : * t2 = t2 + t1 * l
28323 : * l = 2 * l
28324 : */
28325 557100 : __pyx_v_t1 = (__pyx_v_t1 % 2);
28326 :
28327 : /* "scipy/stats/_sobol.pyx":393
28328 : * t1 += ibits(lsmdp, k, 1) * ibits(vdj, k, 1)
28329 : * t1 = t1 % 2
28330 : * t2 = t2 + t1 * l # <<<<<<<<<<<<<<
28331 : * l = 2 * l
28332 : * sv[d, j] = t2
28333 : */
28334 557100 : __pyx_v_t2 = (__pyx_v_t2 + (__pyx_v_t1 * __pyx_v_l));
28335 :
28336 : /* "scipy/stats/_sobol.pyx":394
28337 : * t1 = t1 % 2
28338 : * t2 = t2 + t1 * l
28339 : * l = 2 * l # <<<<<<<<<<<<<<
28340 : * sv[d, j] = t2
28341 : *
28342 : */
28343 557100 : __pyx_v_l = (2 * __pyx_v_l);
28344 : }
28345 :
28346 : /* "scipy/stats/_sobol.pyx":395
28347 : * t2 = t2 + t1 * l
28348 : * l = 2 * l
28349 : * sv[d, j] = t2 # <<<<<<<<<<<<<<
28350 : *
28351 : *
28352 : */
28353 18570 : __pyx_t_8 = __pyx_v_d;
28354 18570 : __pyx_t_9 = __pyx_v_j;
28355 18570 : *((__pyx_t_5numpy_uint32_t *) ( /* dim=1 */ ((char *) (((__pyx_t_5numpy_uint32_t *) ( /* dim=0 */ (__pyx_v_sv.data + __pyx_t_8 * __pyx_v_sv.strides[0]) )) + __pyx_t_9)) )) = __pyx_v_t2;
28356 : }
28357 : }
28358 :
28359 : /* "scipy/stats/_sobol.pyx":369
28360 : * @cython.boundscheck(False)
28361 : * @cython.wraparound(False)
28362 : * cpdef void _cscramble(const int dim, # <<<<<<<<<<<<<<
28363 : * const int bits,
28364 : * uint_32_64[:, :, ::1] ltm,
28365 : */
28366 :
28367 : /* function exit code */
28368 241 : }
28369 :
28370 : /* Python wrapper */
28371 : static PyObject *__pyx_pw_5scipy_5stats_6_sobol_37__pyx_fuse_0_cscramble(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
28372 : static PyMethodDef __pyx_fuse_0__pyx_mdef_5scipy_5stats_6_sobol_37__pyx_fuse_0_cscramble = {"__pyx_fuse_0_cscramble", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5scipy_5stats_6_sobol_37__pyx_fuse_0_cscramble, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5scipy_5stats_6_sobol_10_cscramble};
28373 241 : static PyObject *__pyx_pw_5scipy_5stats_6_sobol_37__pyx_fuse_0_cscramble(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
28374 241 : int __pyx_v_dim;
28375 241 : int __pyx_v_bits;
28376 241 : __Pyx_memviewslice __pyx_v_ltm = { 0, 0, { 0 }, { 0 }, { 0 } };
28377 241 : __Pyx_memviewslice __pyx_v_sv = { 0, 0, { 0 }, { 0 }, { 0 } };
28378 241 : CYTHON_UNUSED Py_ssize_t __pyx_nargs;
28379 241 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
28380 241 : PyObject* values[4] = {0,0,0,0};
28381 241 : int __pyx_lineno = 0;
28382 241 : const char *__pyx_filename = NULL;
28383 241 : int __pyx_clineno = 0;
28384 241 : PyObject *__pyx_r = 0;
28385 : __Pyx_RefNannyDeclarations
28386 241 : __Pyx_RefNannySetupContext("__pyx_fuse_0_cscramble (wrapper)", 0);
28387 : #if CYTHON_ASSUME_SAFE_MACROS
28388 241 : __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
28389 : #else
28390 : __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
28391 : #endif
28392 241 : __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
28393 : {
28394 241 : PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dim,&__pyx_n_s_bits,&__pyx_n_s_ltm,&__pyx_n_s_sv,0};
28395 241 : if (__pyx_kwds) {
28396 241 : Py_ssize_t kw_args;
28397 241 : switch (__pyx_nargs) {
28398 0 : case 4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
28399 0 : CYTHON_FALLTHROUGH;
28400 0 : case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
28401 0 : CYTHON_FALLTHROUGH;
28402 0 : case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
28403 0 : CYTHON_FALLTHROUGH;
28404 0 : case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
28405 241 : CYTHON_FALLTHROUGH;
28406 241 : case 0: break;
28407 0 : default: goto __pyx_L5_argtuple_error;
28408 : }
28409 241 : kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
28410 241 : switch (__pyx_nargs) {
28411 241 : case 0:
28412 241 : if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_dim)) != 0)) {
28413 241 : (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
28414 241 : kw_args--;
28415 : }
28416 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 369, __pyx_L3_error)
28417 0 : else goto __pyx_L5_argtuple_error;
28418 241 : CYTHON_FALLTHROUGH;
28419 : case 1:
28420 241 : if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_bits)) != 0)) {
28421 241 : (void)__Pyx_Arg_NewRef_VARARGS(values[1]);
28422 241 : kw_args--;
28423 : }
28424 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 369, __pyx_L3_error)
28425 : else {
28426 0 : __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_cscramble", 1, 4, 4, 1); __PYX_ERR(0, 369, __pyx_L3_error)
28427 : }
28428 241 : CYTHON_FALLTHROUGH;
28429 : case 2:
28430 241 : if (likely((values[2] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ltm)) != 0)) {
28431 241 : (void)__Pyx_Arg_NewRef_VARARGS(values[2]);
28432 241 : kw_args--;
28433 : }
28434 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 369, __pyx_L3_error)
28435 : else {
28436 0 : __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_cscramble", 1, 4, 4, 2); __PYX_ERR(0, 369, __pyx_L3_error)
28437 : }
28438 241 : CYTHON_FALLTHROUGH;
28439 : case 3:
28440 241 : if (likely((values[3] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_sv)) != 0)) {
28441 241 : (void)__Pyx_Arg_NewRef_VARARGS(values[3]);
28442 241 : kw_args--;
28443 : }
28444 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 369, __pyx_L3_error)
28445 : else {
28446 0 : __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_cscramble", 1, 4, 4, 3); __PYX_ERR(0, 369, __pyx_L3_error)
28447 : }
28448 : }
28449 241 : if (unlikely(kw_args > 0)) {
28450 0 : const Py_ssize_t kwd_pos_args = __pyx_nargs;
28451 0 : if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_0_cscramble") < 0)) __PYX_ERR(0, 369, __pyx_L3_error)
28452 : }
28453 0 : } else if (unlikely(__pyx_nargs != 4)) {
28454 0 : goto __pyx_L5_argtuple_error;
28455 : } else {
28456 0 : values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
28457 0 : values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
28458 0 : values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
28459 0 : values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
28460 : }
28461 241 : __pyx_v_dim = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_dim == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 369, __pyx_L3_error)
28462 241 : __pyx_v_bits = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_bits == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 370, __pyx_L3_error)
28463 241 : __pyx_v_ltm = __Pyx_PyObject_to_MemoryviewSlice_d_d_dc_nn___pyx_t_5numpy_uint32_t(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_ltm.memview)) __PYX_ERR(0, 371, __pyx_L3_error)
28464 241 : __pyx_v_sv = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_5numpy_uint32_t(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_sv.memview)) __PYX_ERR(0, 372, __pyx_L3_error)
28465 : }
28466 241 : goto __pyx_L6_skip;
28467 0 : __pyx_L5_argtuple_error:;
28468 0 : __Pyx_RaiseArgtupleInvalid("__pyx_fuse_0_cscramble", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 369, __pyx_L3_error)
28469 241 : __pyx_L6_skip:;
28470 241 : goto __pyx_L4_argument_unpacking_done;
28471 0 : __pyx_L3_error:;
28472 : {
28473 0 : Py_ssize_t __pyx_temp;
28474 0 : for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
28475 : __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
28476 : }
28477 : }
28478 0 : __PYX_XCLEAR_MEMVIEW(&__pyx_v_ltm, 1);
28479 0 : __PYX_XCLEAR_MEMVIEW(&__pyx_v_sv, 1);
28480 0 : __Pyx_AddTraceback("scipy.stats._sobol.__pyx_fuse_0_cscramble", __pyx_clineno, __pyx_lineno, __pyx_filename);
28481 0 : __Pyx_RefNannyFinishContext();
28482 0 : return NULL;
28483 241 : __pyx_L4_argument_unpacking_done:;
28484 241 : __pyx_r = __pyx_pf_5scipy_5stats_6_sobol_36__pyx_fuse_0_cscramble(__pyx_self, __pyx_v_dim, __pyx_v_bits, __pyx_v_ltm, __pyx_v_sv);
28485 :
28486 : /* function exit code */
28487 241 : __PYX_XCLEAR_MEMVIEW(&__pyx_v_ltm, 1);
28488 241 : __PYX_XCLEAR_MEMVIEW(&__pyx_v_sv, 1);
28489 : {
28490 241 : Py_ssize_t __pyx_temp;
28491 241 : for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
28492 : __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
28493 : }
28494 : }
28495 : __Pyx_RefNannyFinishContext();
28496 : return __pyx_r;
28497 : }
28498 :
28499 241 : static PyObject *__pyx_pf_5scipy_5stats_6_sobol_36__pyx_fuse_0_cscramble(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_dim, int __pyx_v_bits, __Pyx_memviewslice __pyx_v_ltm, __Pyx_memviewslice __pyx_v_sv) {
28500 241 : PyObject *__pyx_r = NULL;
28501 : __Pyx_RefNannyDeclarations
28502 241 : PyObject *__pyx_t_1 = NULL;
28503 241 : int __pyx_lineno = 0;
28504 241 : const char *__pyx_filename = NULL;
28505 241 : int __pyx_clineno = 0;
28506 241 : __Pyx_RefNannySetupContext("__pyx_fuse_0_cscramble", 1);
28507 241 : __Pyx_XDECREF(__pyx_r);
28508 241 : if (unlikely(!__pyx_v_ltm.memview)) { __Pyx_RaiseUnboundLocalError("ltm"); __PYX_ERR(0, 369, __pyx_L1_error) }
28509 241 : if (unlikely(!__pyx_v_sv.memview)) { __Pyx_RaiseUnboundLocalError("sv"); __PYX_ERR(0, 369, __pyx_L1_error) }
28510 241 : __pyx_t_1 = __Pyx_void_to_None(__pyx_fuse_0__pyx_f_5scipy_5stats_6_sobol__cscramble(__pyx_v_dim, __pyx_v_bits, __pyx_v_ltm, __pyx_v_sv, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 369, __pyx_L1_error)
28511 241 : __Pyx_GOTREF(__pyx_t_1);
28512 241 : __pyx_r = __pyx_t_1;
28513 241 : __pyx_t_1 = 0;
28514 241 : goto __pyx_L0;
28515 :
28516 : /* function exit code */
28517 0 : __pyx_L1_error:;
28518 0 : __Pyx_XDECREF(__pyx_t_1);
28519 0 : __Pyx_AddTraceback("scipy.stats._sobol.__pyx_fuse_0_cscramble", __pyx_clineno, __pyx_lineno, __pyx_filename);
28520 0 : __pyx_r = NULL;
28521 241 : __pyx_L0:;
28522 241 : __Pyx_XGIVEREF(__pyx_r);
28523 241 : __Pyx_RefNannyFinishContext();
28524 241 : return __pyx_r;
28525 : }
28526 :
28527 : static PyObject *__pyx_pw_5scipy_5stats_6_sobol_39__pyx_fuse_1_cscramble(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
28528 : static PyObject *__pyx_pw_5scipy_5stats_6_sobol_11_cscramble(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
28529 9 : static void __pyx_fuse_1__pyx_f_5scipy_5stats_6_sobol__cscramble(int const __pyx_v_dim, int const __pyx_v_bits, __Pyx_memviewslice __pyx_v_ltm, __Pyx_memviewslice __pyx_v_sv, CYTHON_UNUSED int __pyx_skip_dispatch) {
28530 9 : int __pyx_v_d;
28531 9 : int __pyx_v_i;
28532 9 : int __pyx_v_j;
28533 9 : int __pyx_v_k;
28534 9 : int __pyx_v_p;
28535 9 : __pyx_t_5numpy_uint64_t __pyx_v_l;
28536 9 : __pyx_t_5numpy_uint64_t __pyx_v_lsmdp;
28537 9 : __pyx_t_5numpy_uint64_t __pyx_v_t1;
28538 9 : __pyx_t_5numpy_uint64_t __pyx_v_t2;
28539 9 : __pyx_t_5numpy_uint64_t __pyx_v_vdj;
28540 9 : int __pyx_t_1;
28541 9 : int __pyx_t_2;
28542 9 : int __pyx_t_3;
28543 9 : int __pyx_t_4;
28544 9 : int __pyx_t_5;
28545 9 : int __pyx_t_6;
28546 9 : Py_ssize_t __pyx_t_7;
28547 9 : Py_ssize_t __pyx_t_8;
28548 9 : Py_ssize_t __pyx_t_9;
28549 9 : int __pyx_t_10;
28550 9 : __Pyx_memviewslice __pyx_t_11 = { 0, 0, { 0 }, { 0 }, { 0 } };
28551 9 : int __pyx_t_12;
28552 9 : int __pyx_t_13;
28553 9 : int __pyx_t_14;
28554 :
28555 : /* "scipy/stats/_sobol.pyx":378
28556 : *
28557 : * # Set diagonals of bits x bits arrays to 1
28558 : * for d in range(dim): # <<<<<<<<<<<<<<
28559 : * for i in range(bits):
28560 : * ltm[d, i, i] = 1
28561 : */
28562 9 : __pyx_t_1 = __pyx_v_dim;
28563 9 : __pyx_t_2 = __pyx_t_1;
28564 63 : for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
28565 : __pyx_v_d = __pyx_t_3;
28566 :
28567 : /* "scipy/stats/_sobol.pyx":379
28568 : * # Set diagonals of bits x bits arrays to 1
28569 : * for d in range(dim):
28570 : * for i in range(bits): # <<<<<<<<<<<<<<
28571 : * ltm[d, i, i] = 1
28572 : *
28573 : */
28574 : __pyx_t_4 = __pyx_v_bits;
28575 : __pyx_t_5 = __pyx_t_4;
28576 3510 : for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
28577 3456 : __pyx_v_i = __pyx_t_6;
28578 :
28579 : /* "scipy/stats/_sobol.pyx":380
28580 : * for d in range(dim):
28581 : * for i in range(bits):
28582 : * ltm[d, i, i] = 1 # <<<<<<<<<<<<<<
28583 : *
28584 : * for d in range(dim):
28585 : */
28586 3456 : __pyx_t_7 = __pyx_v_d;
28587 3456 : __pyx_t_8 = __pyx_v_i;
28588 3456 : __pyx_t_9 = __pyx_v_i;
28589 3456 : *((__pyx_t_5numpy_uint64_t *) ( /* dim=2 */ ((char *) (((__pyx_t_5numpy_uint64_t *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_ltm.data + __pyx_t_7 * __pyx_v_ltm.strides[0]) ) + __pyx_t_8 * __pyx_v_ltm.strides[1]) )) + __pyx_t_9)) )) = 1;
28590 : }
28591 : }
28592 :
28593 : /* "scipy/stats/_sobol.pyx":382
28594 : * ltm[d, i, i] = 1
28595 : *
28596 : * for d in range(dim): # <<<<<<<<<<<<<<
28597 : * for j in range(bits):
28598 : * vdj = sv[d, j]
28599 : */
28600 63 : __pyx_t_1 = __pyx_v_dim;
28601 63 : __pyx_t_2 = __pyx_t_1;
28602 63 : for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
28603 : __pyx_v_d = __pyx_t_3;
28604 :
28605 : /* "scipy/stats/_sobol.pyx":383
28606 : *
28607 : * for d in range(dim):
28608 : * for j in range(bits): # <<<<<<<<<<<<<<
28609 : * vdj = sv[d, j]
28610 : * l = 1
28611 : */
28612 : __pyx_t_4 = __pyx_v_bits;
28613 : __pyx_t_5 = __pyx_t_4;
28614 3510 : for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
28615 3456 : __pyx_v_j = __pyx_t_6;
28616 :
28617 : /* "scipy/stats/_sobol.pyx":384
28618 : * for d in range(dim):
28619 : * for j in range(bits):
28620 : * vdj = sv[d, j] # <<<<<<<<<<<<<<
28621 : * l = 1
28622 : * t2 = 0
28623 : */
28624 3456 : __pyx_t_9 = __pyx_v_d;
28625 3456 : __pyx_t_8 = __pyx_v_j;
28626 3456 : __pyx_v_vdj = (*((__pyx_t_5numpy_uint64_t *) ( /* dim=1 */ ((char *) (((__pyx_t_5numpy_uint64_t *) ( /* dim=0 */ (__pyx_v_sv.data + __pyx_t_9 * __pyx_v_sv.strides[0]) )) + __pyx_t_8)) )));
28627 :
28628 : /* "scipy/stats/_sobol.pyx":385
28629 : * for j in range(bits):
28630 : * vdj = sv[d, j]
28631 : * l = 1 # <<<<<<<<<<<<<<
28632 : * t2 = 0
28633 : * for p in range(bits - 1, -1, -1):
28634 : */
28635 3456 : __pyx_v_l = 1;
28636 :
28637 : /* "scipy/stats/_sobol.pyx":386
28638 : * vdj = sv[d, j]
28639 : * l = 1
28640 : * t2 = 0 # <<<<<<<<<<<<<<
28641 : * for p in range(bits - 1, -1, -1):
28642 : * lsmdp = cdot_pow2(ltm[d, p, :])
28643 : */
28644 3456 : __pyx_v_t2 = 0;
28645 :
28646 : /* "scipy/stats/_sobol.pyx":387
28647 : * l = 1
28648 : * t2 = 0
28649 : * for p in range(bits - 1, -1, -1): # <<<<<<<<<<<<<<
28650 : * lsmdp = cdot_pow2(ltm[d, p, :])
28651 : * t1 = 0
28652 : */
28653 224640 : for (__pyx_t_10 = (__pyx_v_bits - 1); __pyx_t_10 > -1; __pyx_t_10-=1) {
28654 221184 : __pyx_v_p = __pyx_t_10;
28655 :
28656 : /* "scipy/stats/_sobol.pyx":388
28657 : * t2 = 0
28658 : * for p in range(bits - 1, -1, -1):
28659 : * lsmdp = cdot_pow2(ltm[d, p, :]) # <<<<<<<<<<<<<<
28660 : * t1 = 0
28661 : * for k in range(bits):
28662 : */
28663 221184 : __pyx_t_11.data = __pyx_v_ltm.data;
28664 221184 : __pyx_t_11.memview = __pyx_v_ltm.memview;
28665 221184 : __PYX_INC_MEMVIEW(&__pyx_t_11, 0);
28666 : {
28667 221184 : Py_ssize_t __pyx_tmp_idx = __pyx_v_d;
28668 221184 : Py_ssize_t __pyx_tmp_stride = __pyx_v_ltm.strides[0];
28669 221184 : __pyx_t_11.data += __pyx_tmp_idx * __pyx_tmp_stride;
28670 : }
28671 :
28672 : {
28673 221184 : Py_ssize_t __pyx_tmp_idx = __pyx_v_p;
28674 221184 : Py_ssize_t __pyx_tmp_stride = __pyx_v_ltm.strides[1];
28675 221184 : __pyx_t_11.data += __pyx_tmp_idx * __pyx_tmp_stride;
28676 : }
28677 :
28678 221184 : __pyx_t_11.shape[0] = __pyx_v_ltm.shape[2];
28679 221184 : __pyx_t_11.strides[0] = __pyx_v_ltm.strides[2];
28680 221184 : __pyx_t_11.suboffsets[0] = -1;
28681 :
28682 221184 : __pyx_v_lsmdp = __pyx_fuse_1__pyx_f_5scipy_5stats_6_sobol_cdot_pow2(__pyx_t_11);
28683 221184 : __PYX_XCLEAR_MEMVIEW(&__pyx_t_11, 0);
28684 221184 : __pyx_t_11.memview = NULL; __pyx_t_11.data = NULL;
28685 :
28686 : /* "scipy/stats/_sobol.pyx":389
28687 : * for p in range(bits - 1, -1, -1):
28688 : * lsmdp = cdot_pow2(ltm[d, p, :])
28689 : * t1 = 0 # <<<<<<<<<<<<<<
28690 : * for k in range(bits):
28691 : * t1 += ibits(lsmdp, k, 1) * ibits(vdj, k, 1)
28692 : */
28693 221184 : __pyx_v_t1 = 0;
28694 :
28695 : /* "scipy/stats/_sobol.pyx":390
28696 : * lsmdp = cdot_pow2(ltm[d, p, :])
28697 : * t1 = 0
28698 : * for k in range(bits): # <<<<<<<<<<<<<<
28699 : * t1 += ibits(lsmdp, k, 1) * ibits(vdj, k, 1)
28700 : * t1 = t1 % 2
28701 : */
28702 221184 : __pyx_t_12 = __pyx_v_bits;
28703 221184 : __pyx_t_13 = __pyx_t_12;
28704 14376960 : for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) {
28705 14155776 : __pyx_v_k = __pyx_t_14;
28706 :
28707 : /* "scipy/stats/_sobol.pyx":391
28708 : * t1 = 0
28709 : * for k in range(bits):
28710 : * t1 += ibits(lsmdp, k, 1) * ibits(vdj, k, 1) # <<<<<<<<<<<<<<
28711 : * t1 = t1 % 2
28712 : * t2 = t2 + t1 * l
28713 : */
28714 14155776 : __pyx_v_t1 = (__pyx_v_t1 + (__pyx_fuse_1__pyx_f_5scipy_5stats_6_sobol_ibits(__pyx_v_lsmdp, __pyx_v_k, 1) * __pyx_fuse_1__pyx_f_5scipy_5stats_6_sobol_ibits(__pyx_v_vdj, __pyx_v_k, 1)));
28715 : }
28716 :
28717 : /* "scipy/stats/_sobol.pyx":392
28718 : * for k in range(bits):
28719 : * t1 += ibits(lsmdp, k, 1) * ibits(vdj, k, 1)
28720 : * t1 = t1 % 2 # <<<<<<<<<<<<<<
28721 : * t2 = t2 + t1 * l
28722 : * l = 2 * l
28723 : */
28724 221184 : __pyx_v_t1 = (__pyx_v_t1 % 2);
28725 :
28726 : /* "scipy/stats/_sobol.pyx":393
28727 : * t1 += ibits(lsmdp, k, 1) * ibits(vdj, k, 1)
28728 : * t1 = t1 % 2
28729 : * t2 = t2 + t1 * l # <<<<<<<<<<<<<<
28730 : * l = 2 * l
28731 : * sv[d, j] = t2
28732 : */
28733 221184 : __pyx_v_t2 = (__pyx_v_t2 + (__pyx_v_t1 * __pyx_v_l));
28734 :
28735 : /* "scipy/stats/_sobol.pyx":394
28736 : * t1 = t1 % 2
28737 : * t2 = t2 + t1 * l
28738 : * l = 2 * l # <<<<<<<<<<<<<<
28739 : * sv[d, j] = t2
28740 : *
28741 : */
28742 221184 : __pyx_v_l = (2 * __pyx_v_l);
28743 : }
28744 :
28745 : /* "scipy/stats/_sobol.pyx":395
28746 : * t2 = t2 + t1 * l
28747 : * l = 2 * l
28748 : * sv[d, j] = t2 # <<<<<<<<<<<<<<
28749 : *
28750 : *
28751 : */
28752 3456 : __pyx_t_8 = __pyx_v_d;
28753 3456 : __pyx_t_9 = __pyx_v_j;
28754 3456 : *((__pyx_t_5numpy_uint64_t *) ( /* dim=1 */ ((char *) (((__pyx_t_5numpy_uint64_t *) ( /* dim=0 */ (__pyx_v_sv.data + __pyx_t_8 * __pyx_v_sv.strides[0]) )) + __pyx_t_9)) )) = __pyx_v_t2;
28755 : }
28756 : }
28757 :
28758 : /* "scipy/stats/_sobol.pyx":369
28759 : * @cython.boundscheck(False)
28760 : * @cython.wraparound(False)
28761 : * cpdef void _cscramble(const int dim, # <<<<<<<<<<<<<<
28762 : * const int bits,
28763 : * uint_32_64[:, :, ::1] ltm,
28764 : */
28765 :
28766 : /* function exit code */
28767 9 : }
28768 :
28769 : /* Python wrapper */
28770 : static PyObject *__pyx_pw_5scipy_5stats_6_sobol_39__pyx_fuse_1_cscramble(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
28771 : static PyMethodDef __pyx_fuse_1__pyx_mdef_5scipy_5stats_6_sobol_39__pyx_fuse_1_cscramble = {"__pyx_fuse_1_cscramble", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5scipy_5stats_6_sobol_39__pyx_fuse_1_cscramble, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5scipy_5stats_6_sobol_10_cscramble};
28772 9 : static PyObject *__pyx_pw_5scipy_5stats_6_sobol_39__pyx_fuse_1_cscramble(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
28773 9 : int __pyx_v_dim;
28774 9 : int __pyx_v_bits;
28775 9 : __Pyx_memviewslice __pyx_v_ltm = { 0, 0, { 0 }, { 0 }, { 0 } };
28776 9 : __Pyx_memviewslice __pyx_v_sv = { 0, 0, { 0 }, { 0 }, { 0 } };
28777 9 : CYTHON_UNUSED Py_ssize_t __pyx_nargs;
28778 9 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
28779 9 : PyObject* values[4] = {0,0,0,0};
28780 9 : int __pyx_lineno = 0;
28781 9 : const char *__pyx_filename = NULL;
28782 9 : int __pyx_clineno = 0;
28783 9 : PyObject *__pyx_r = 0;
28784 : __Pyx_RefNannyDeclarations
28785 9 : __Pyx_RefNannySetupContext("__pyx_fuse_1_cscramble (wrapper)", 0);
28786 : #if CYTHON_ASSUME_SAFE_MACROS
28787 9 : __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
28788 : #else
28789 : __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
28790 : #endif
28791 9 : __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
28792 : {
28793 9 : PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dim,&__pyx_n_s_bits,&__pyx_n_s_ltm,&__pyx_n_s_sv,0};
28794 9 : if (__pyx_kwds) {
28795 9 : Py_ssize_t kw_args;
28796 9 : switch (__pyx_nargs) {
28797 0 : case 4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
28798 0 : CYTHON_FALLTHROUGH;
28799 0 : case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
28800 0 : CYTHON_FALLTHROUGH;
28801 0 : case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
28802 0 : CYTHON_FALLTHROUGH;
28803 0 : case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
28804 9 : CYTHON_FALLTHROUGH;
28805 9 : case 0: break;
28806 0 : default: goto __pyx_L5_argtuple_error;
28807 : }
28808 9 : kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
28809 9 : switch (__pyx_nargs) {
28810 9 : case 0:
28811 9 : if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_dim)) != 0)) {
28812 9 : (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
28813 9 : kw_args--;
28814 : }
28815 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 369, __pyx_L3_error)
28816 0 : else goto __pyx_L5_argtuple_error;
28817 9 : CYTHON_FALLTHROUGH;
28818 : case 1:
28819 9 : if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_bits)) != 0)) {
28820 9 : (void)__Pyx_Arg_NewRef_VARARGS(values[1]);
28821 9 : kw_args--;
28822 : }
28823 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 369, __pyx_L3_error)
28824 : else {
28825 0 : __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_cscramble", 1, 4, 4, 1); __PYX_ERR(0, 369, __pyx_L3_error)
28826 : }
28827 9 : CYTHON_FALLTHROUGH;
28828 : case 2:
28829 9 : if (likely((values[2] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ltm)) != 0)) {
28830 9 : (void)__Pyx_Arg_NewRef_VARARGS(values[2]);
28831 9 : kw_args--;
28832 : }
28833 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 369, __pyx_L3_error)
28834 : else {
28835 0 : __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_cscramble", 1, 4, 4, 2); __PYX_ERR(0, 369, __pyx_L3_error)
28836 : }
28837 9 : CYTHON_FALLTHROUGH;
28838 : case 3:
28839 9 : if (likely((values[3] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_sv)) != 0)) {
28840 9 : (void)__Pyx_Arg_NewRef_VARARGS(values[3]);
28841 9 : kw_args--;
28842 : }
28843 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 369, __pyx_L3_error)
28844 : else {
28845 0 : __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_cscramble", 1, 4, 4, 3); __PYX_ERR(0, 369, __pyx_L3_error)
28846 : }
28847 : }
28848 9 : if (unlikely(kw_args > 0)) {
28849 0 : const Py_ssize_t kwd_pos_args = __pyx_nargs;
28850 0 : if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fuse_1_cscramble") < 0)) __PYX_ERR(0, 369, __pyx_L3_error)
28851 : }
28852 0 : } else if (unlikely(__pyx_nargs != 4)) {
28853 0 : goto __pyx_L5_argtuple_error;
28854 : } else {
28855 0 : values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
28856 0 : values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
28857 0 : values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
28858 0 : values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
28859 : }
28860 9 : __pyx_v_dim = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_dim == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 369, __pyx_L3_error)
28861 9 : __pyx_v_bits = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_bits == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 370, __pyx_L3_error)
28862 9 : __pyx_v_ltm = __Pyx_PyObject_to_MemoryviewSlice_d_d_dc_nn___pyx_t_5numpy_uint64_t(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_ltm.memview)) __PYX_ERR(0, 371, __pyx_L3_error)
28863 9 : __pyx_v_sv = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_5numpy_uint64_t(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_sv.memview)) __PYX_ERR(0, 372, __pyx_L3_error)
28864 : }
28865 9 : goto __pyx_L6_skip;
28866 0 : __pyx_L5_argtuple_error:;
28867 0 : __Pyx_RaiseArgtupleInvalid("__pyx_fuse_1_cscramble", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 369, __pyx_L3_error)
28868 9 : __pyx_L6_skip:;
28869 9 : goto __pyx_L4_argument_unpacking_done;
28870 0 : __pyx_L3_error:;
28871 : {
28872 0 : Py_ssize_t __pyx_temp;
28873 0 : for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
28874 : __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
28875 : }
28876 : }
28877 0 : __PYX_XCLEAR_MEMVIEW(&__pyx_v_ltm, 1);
28878 0 : __PYX_XCLEAR_MEMVIEW(&__pyx_v_sv, 1);
28879 0 : __Pyx_AddTraceback("scipy.stats._sobol.__pyx_fuse_1_cscramble", __pyx_clineno, __pyx_lineno, __pyx_filename);
28880 0 : __Pyx_RefNannyFinishContext();
28881 0 : return NULL;
28882 9 : __pyx_L4_argument_unpacking_done:;
28883 9 : __pyx_r = __pyx_pf_5scipy_5stats_6_sobol_38__pyx_fuse_1_cscramble(__pyx_self, __pyx_v_dim, __pyx_v_bits, __pyx_v_ltm, __pyx_v_sv);
28884 :
28885 : /* function exit code */
28886 9 : __PYX_XCLEAR_MEMVIEW(&__pyx_v_ltm, 1);
28887 9 : __PYX_XCLEAR_MEMVIEW(&__pyx_v_sv, 1);
28888 : {
28889 9 : Py_ssize_t __pyx_temp;
28890 9 : for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
28891 : __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
28892 : }
28893 : }
28894 : __Pyx_RefNannyFinishContext();
28895 : return __pyx_r;
28896 : }
28897 :
28898 9 : static PyObject *__pyx_pf_5scipy_5stats_6_sobol_38__pyx_fuse_1_cscramble(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_dim, int __pyx_v_bits, __Pyx_memviewslice __pyx_v_ltm, __Pyx_memviewslice __pyx_v_sv) {
28899 9 : PyObject *__pyx_r = NULL;
28900 : __Pyx_RefNannyDeclarations
28901 9 : PyObject *__pyx_t_1 = NULL;
28902 9 : int __pyx_lineno = 0;
28903 9 : const char *__pyx_filename = NULL;
28904 9 : int __pyx_clineno = 0;
28905 9 : __Pyx_RefNannySetupContext("__pyx_fuse_1_cscramble", 1);
28906 9 : __Pyx_XDECREF(__pyx_r);
28907 9 : if (unlikely(!__pyx_v_ltm.memview)) { __Pyx_RaiseUnboundLocalError("ltm"); __PYX_ERR(0, 369, __pyx_L1_error) }
28908 9 : if (unlikely(!__pyx_v_sv.memview)) { __Pyx_RaiseUnboundLocalError("sv"); __PYX_ERR(0, 369, __pyx_L1_error) }
28909 9 : __pyx_t_1 = __Pyx_void_to_None(__pyx_fuse_1__pyx_f_5scipy_5stats_6_sobol__cscramble(__pyx_v_dim, __pyx_v_bits, __pyx_v_ltm, __pyx_v_sv, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 369, __pyx_L1_error)
28910 9 : __Pyx_GOTREF(__pyx_t_1);
28911 9 : __pyx_r = __pyx_t_1;
28912 9 : __pyx_t_1 = 0;
28913 9 : goto __pyx_L0;
28914 :
28915 : /* function exit code */
28916 0 : __pyx_L1_error:;
28917 0 : __Pyx_XDECREF(__pyx_t_1);
28918 0 : __Pyx_AddTraceback("scipy.stats._sobol.__pyx_fuse_1_cscramble", __pyx_clineno, __pyx_lineno, __pyx_filename);
28919 0 : __pyx_r = NULL;
28920 9 : __pyx_L0:;
28921 9 : __Pyx_XGIVEREF(__pyx_r);
28922 9 : __Pyx_RefNannyFinishContext();
28923 9 : return __pyx_r;
28924 : }
28925 :
28926 : /* "scipy/stats/_sobol.pyx":400
28927 : * @cython.boundscheck(False)
28928 : * @cython.wraparound(False)
28929 : * cpdef void _fill_p_cumulative(const cnp.float_t[::1] p, # <<<<<<<<<<<<<<
28930 : * cnp.float_t[::1] p_cumulative) noexcept nogil:
28931 : * cdef int i
28932 : */
28933 :
28934 : static PyObject *__pyx_pw_5scipy_5stats_6_sobol_13_fill_p_cumulative(PyObject *__pyx_self,
28935 : #if CYTHON_METH_FASTCALL
28936 : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
28937 : #else
28938 : PyObject *__pyx_args, PyObject *__pyx_kwds
28939 : #endif
28940 : ); /*proto*/
28941 3 : static void __pyx_f_5scipy_5stats_6_sobol__fill_p_cumulative(__Pyx_memviewslice __pyx_v_p, __Pyx_memviewslice __pyx_v_p_cumulative, CYTHON_UNUSED int __pyx_skip_dispatch) {
28942 3 : int __pyx_v_i;
28943 3 : int __pyx_v_len_p;
28944 3 : float __pyx_v_tot;
28945 3 : float __pyx_v_t;
28946 3 : int __pyx_t_1;
28947 3 : int __pyx_t_2;
28948 3 : int __pyx_t_3;
28949 3 : Py_ssize_t __pyx_t_4;
28950 :
28951 : /* "scipy/stats/_sobol.pyx":403
28952 : * cnp.float_t[::1] p_cumulative) noexcept nogil:
28953 : * cdef int i
28954 : * cdef int len_p = p.shape[0] # <<<<<<<<<<<<<<
28955 : * cdef float tot = 0
28956 : * cdef float t
28957 : */
28958 3 : __pyx_v_len_p = (__pyx_v_p.shape[0]);
28959 :
28960 : /* "scipy/stats/_sobol.pyx":404
28961 : * cdef int i
28962 : * cdef int len_p = p.shape[0]
28963 : * cdef float tot = 0 # <<<<<<<<<<<<<<
28964 : * cdef float t
28965 : * for i in range(len_p):
28966 : */
28967 3 : __pyx_v_tot = 0.0;
28968 :
28969 : /* "scipy/stats/_sobol.pyx":406
28970 : * cdef float tot = 0
28971 : * cdef float t
28972 : * for i in range(len_p): # <<<<<<<<<<<<<<
28973 : * t = tot + p[i]
28974 : * p_cumulative[i] = t
28975 : */
28976 3 : __pyx_t_1 = __pyx_v_len_p;
28977 3 : __pyx_t_2 = __pyx_t_1;
28978 18 : for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
28979 15 : __pyx_v_i = __pyx_t_3;
28980 :
28981 : /* "scipy/stats/_sobol.pyx":407
28982 : * cdef float t
28983 : * for i in range(len_p):
28984 : * t = tot + p[i] # <<<<<<<<<<<<<<
28985 : * p_cumulative[i] = t
28986 : * tot = t
28987 : */
28988 15 : __pyx_t_4 = __pyx_v_i;
28989 15 : __pyx_v_t = (__pyx_v_tot + (*((__pyx_t_5numpy_float_t const *) ( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float_t const *) __pyx_v_p.data) + __pyx_t_4)) ))));
28990 :
28991 : /* "scipy/stats/_sobol.pyx":408
28992 : * for i in range(len_p):
28993 : * t = tot + p[i]
28994 : * p_cumulative[i] = t # <<<<<<<<<<<<<<
28995 : * tot = t
28996 : *
28997 : */
28998 15 : __pyx_t_4 = __pyx_v_i;
28999 15 : *((__pyx_t_5numpy_float_t *) ( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float_t *) __pyx_v_p_cumulative.data) + __pyx_t_4)) )) = __pyx_v_t;
29000 :
29001 : /* "scipy/stats/_sobol.pyx":409
29002 : * t = tot + p[i]
29003 : * p_cumulative[i] = t
29004 : * tot = t # <<<<<<<<<<<<<<
29005 : *
29006 : *
29007 : */
29008 15 : __pyx_v_tot = __pyx_v_t;
29009 : }
29010 :
29011 : /* "scipy/stats/_sobol.pyx":400
29012 : * @cython.boundscheck(False)
29013 : * @cython.wraparound(False)
29014 : * cpdef void _fill_p_cumulative(const cnp.float_t[::1] p, # <<<<<<<<<<<<<<
29015 : * cnp.float_t[::1] p_cumulative) noexcept nogil:
29016 : * cdef int i
29017 : */
29018 :
29019 : /* function exit code */
29020 : }
29021 :
29022 : /* Python wrapper */
29023 : static PyObject *__pyx_pw_5scipy_5stats_6_sobol_13_fill_p_cumulative(PyObject *__pyx_self,
29024 : #if CYTHON_METH_FASTCALL
29025 : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
29026 : #else
29027 : PyObject *__pyx_args, PyObject *__pyx_kwds
29028 : #endif
29029 : ); /*proto*/
29030 : static PyMethodDef __pyx_mdef_5scipy_5stats_6_sobol_13_fill_p_cumulative = {"_fill_p_cumulative", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5scipy_5stats_6_sobol_13_fill_p_cumulative, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
29031 3 : static PyObject *__pyx_pw_5scipy_5stats_6_sobol_13_fill_p_cumulative(PyObject *__pyx_self,
29032 : #if CYTHON_METH_FASTCALL
29033 : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
29034 : #else
29035 : PyObject *__pyx_args, PyObject *__pyx_kwds
29036 : #endif
29037 : ) {
29038 3 : __Pyx_memviewslice __pyx_v_p = { 0, 0, { 0 }, { 0 }, { 0 } };
29039 3 : __Pyx_memviewslice __pyx_v_p_cumulative = { 0, 0, { 0 }, { 0 }, { 0 } };
29040 : #if !CYTHON_METH_FASTCALL
29041 : CYTHON_UNUSED Py_ssize_t __pyx_nargs;
29042 : #endif
29043 3 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
29044 3 : PyObject* values[2] = {0,0};
29045 3 : int __pyx_lineno = 0;
29046 3 : const char *__pyx_filename = NULL;
29047 3 : int __pyx_clineno = 0;
29048 3 : PyObject *__pyx_r = 0;
29049 : __Pyx_RefNannyDeclarations
29050 3 : __Pyx_RefNannySetupContext("_fill_p_cumulative (wrapper)", 0);
29051 : #if !CYTHON_METH_FASTCALL
29052 : #if CYTHON_ASSUME_SAFE_MACROS
29053 : __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
29054 : #else
29055 : __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
29056 : #endif
29057 : #endif
29058 3 : __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
29059 : {
29060 3 : PyObject **__pyx_pyargnames[] = {&__pyx_n_s_p,&__pyx_n_s_p_cumulative,0};
29061 3 : if (__pyx_kwds) {
29062 0 : Py_ssize_t kw_args;
29063 0 : switch (__pyx_nargs) {
29064 0 : case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
29065 0 : CYTHON_FALLTHROUGH;
29066 0 : case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
29067 0 : CYTHON_FALLTHROUGH;
29068 0 : case 0: break;
29069 0 : default: goto __pyx_L5_argtuple_error;
29070 : }
29071 0 : kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
29072 0 : switch (__pyx_nargs) {
29073 : case 0:
29074 0 : if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_p)) != 0)) {
29075 0 : (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
29076 0 : kw_args--;
29077 : }
29078 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 400, __pyx_L3_error)
29079 0 : else goto __pyx_L5_argtuple_error;
29080 0 : CYTHON_FALLTHROUGH;
29081 : case 1:
29082 0 : if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_p_cumulative)) != 0)) {
29083 0 : (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
29084 0 : kw_args--;
29085 : }
29086 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 400, __pyx_L3_error)
29087 : else {
29088 0 : __Pyx_RaiseArgtupleInvalid("_fill_p_cumulative", 1, 2, 2, 1); __PYX_ERR(0, 400, __pyx_L3_error)
29089 : }
29090 : }
29091 0 : if (unlikely(kw_args > 0)) {
29092 0 : const Py_ssize_t kwd_pos_args = __pyx_nargs;
29093 0 : if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_fill_p_cumulative") < 0)) __PYX_ERR(0, 400, __pyx_L3_error)
29094 : }
29095 3 : } else if (unlikely(__pyx_nargs != 2)) {
29096 0 : goto __pyx_L5_argtuple_error;
29097 : } else {
29098 3 : values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
29099 3 : values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
29100 : }
29101 3 : __pyx_v_p = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_float_t__const__(values[0], 0); if (unlikely(!__pyx_v_p.memview)) __PYX_ERR(0, 400, __pyx_L3_error)
29102 3 : __pyx_v_p_cumulative = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_float_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_p_cumulative.memview)) __PYX_ERR(0, 401, __pyx_L3_error)
29103 : }
29104 3 : goto __pyx_L6_skip;
29105 0 : __pyx_L5_argtuple_error:;
29106 0 : __Pyx_RaiseArgtupleInvalid("_fill_p_cumulative", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 400, __pyx_L3_error)
29107 3 : __pyx_L6_skip:;
29108 3 : goto __pyx_L4_argument_unpacking_done;
29109 0 : __pyx_L3_error:;
29110 : {
29111 0 : Py_ssize_t __pyx_temp;
29112 0 : for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
29113 : __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
29114 : }
29115 : }
29116 0 : __PYX_XCLEAR_MEMVIEW(&__pyx_v_p, 1);
29117 0 : __PYX_XCLEAR_MEMVIEW(&__pyx_v_p_cumulative, 1);
29118 0 : __Pyx_AddTraceback("scipy.stats._sobol._fill_p_cumulative", __pyx_clineno, __pyx_lineno, __pyx_filename);
29119 0 : __Pyx_RefNannyFinishContext();
29120 0 : return NULL;
29121 3 : __pyx_L4_argument_unpacking_done:;
29122 3 : __pyx_r = __pyx_pf_5scipy_5stats_6_sobol_12_fill_p_cumulative(__pyx_self, __pyx_v_p, __pyx_v_p_cumulative);
29123 :
29124 : /* function exit code */
29125 3 : __PYX_XCLEAR_MEMVIEW(&__pyx_v_p, 1);
29126 3 : __PYX_XCLEAR_MEMVIEW(&__pyx_v_p_cumulative, 1);
29127 : {
29128 3 : Py_ssize_t __pyx_temp;
29129 3 : for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
29130 : __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
29131 : }
29132 : }
29133 : __Pyx_RefNannyFinishContext();
29134 : return __pyx_r;
29135 : }
29136 :
29137 3 : static PyObject *__pyx_pf_5scipy_5stats_6_sobol_12_fill_p_cumulative(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_p, __Pyx_memviewslice __pyx_v_p_cumulative) {
29138 3 : PyObject *__pyx_r = NULL;
29139 : __Pyx_RefNannyDeclarations
29140 3 : PyObject *__pyx_t_1 = NULL;
29141 3 : int __pyx_lineno = 0;
29142 3 : const char *__pyx_filename = NULL;
29143 3 : int __pyx_clineno = 0;
29144 3 : __Pyx_RefNannySetupContext("_fill_p_cumulative", 1);
29145 3 : __Pyx_XDECREF(__pyx_r);
29146 3 : if (unlikely(!__pyx_v_p.memview)) { __Pyx_RaiseUnboundLocalError("p"); __PYX_ERR(0, 400, __pyx_L1_error) }
29147 3 : if (unlikely(!__pyx_v_p_cumulative.memview)) { __Pyx_RaiseUnboundLocalError("p_cumulative"); __PYX_ERR(0, 400, __pyx_L1_error) }
29148 6 : __pyx_t_1 = __Pyx_void_to_None(__pyx_f_5scipy_5stats_6_sobol__fill_p_cumulative(__pyx_v_p, __pyx_v_p_cumulative, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 400, __pyx_L1_error)
29149 3 : __Pyx_GOTREF(__pyx_t_1);
29150 3 : __pyx_r = __pyx_t_1;
29151 3 : __pyx_t_1 = 0;
29152 3 : goto __pyx_L0;
29153 :
29154 : /* function exit code */
29155 0 : __pyx_L1_error:;
29156 0 : __Pyx_XDECREF(__pyx_t_1);
29157 0 : __Pyx_AddTraceback("scipy.stats._sobol._fill_p_cumulative", __pyx_clineno, __pyx_lineno, __pyx_filename);
29158 0 : __pyx_r = NULL;
29159 3 : __pyx_L0:;
29160 3 : __Pyx_XGIVEREF(__pyx_r);
29161 3 : __Pyx_RefNannyFinishContext();
29162 3 : return __pyx_r;
29163 : }
29164 :
29165 : /* "scipy/stats/_sobol.pyx":414
29166 : * @cython.boundscheck(False)
29167 : * @cython.wraparound(False)
29168 : * cpdef void _categorize(const cnp.float_t[::1] draws, # <<<<<<<<<<<<<<
29169 : * const cnp.float_t[::1] p_cumulative,
29170 : * cnp.intp_t[::1] result) noexcept nogil:
29171 : */
29172 :
29173 : static PyObject *__pyx_pw_5scipy_5stats_6_sobol_15_categorize(PyObject *__pyx_self,
29174 : #if CYTHON_METH_FASTCALL
29175 : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
29176 : #else
29177 : PyObject *__pyx_args, PyObject *__pyx_kwds
29178 : #endif
29179 : ); /*proto*/
29180 3 : static void __pyx_f_5scipy_5stats_6_sobol__categorize(__Pyx_memviewslice __pyx_v_draws, __Pyx_memviewslice __pyx_v_p_cumulative, __Pyx_memviewslice __pyx_v_result, CYTHON_UNUSED int __pyx_skip_dispatch) {
29181 3 : int __pyx_v_i;
29182 3 : int __pyx_v_n_p;
29183 3 : int __pyx_v_j;
29184 3 : Py_ssize_t __pyx_t_1;
29185 3 : Py_ssize_t __pyx_t_2;
29186 3 : int __pyx_t_3;
29187 3 : Py_ssize_t __pyx_t_4;
29188 3 : Py_ssize_t __pyx_t_5;
29189 :
29190 : /* "scipy/stats/_sobol.pyx":418
29191 : * cnp.intp_t[::1] result) noexcept nogil:
29192 : * cdef int i
29193 : * cdef int n_p = p_cumulative.shape[0] # <<<<<<<<<<<<<<
29194 : * for i in range(draws.shape[0]):
29195 : * j = _find_index(p_cumulative, n_p, draws[i])
29196 : */
29197 3 : __pyx_v_n_p = (__pyx_v_p_cumulative.shape[0]);
29198 :
29199 : /* "scipy/stats/_sobol.pyx":419
29200 : * cdef int i
29201 : * cdef int n_p = p_cumulative.shape[0]
29202 : * for i in range(draws.shape[0]): # <<<<<<<<<<<<<<
29203 : * j = _find_index(p_cumulative, n_p, draws[i])
29204 : * result[j] = result[j] + 1
29205 : */
29206 3 : __pyx_t_1 = (__pyx_v_draws.shape[0]);
29207 3 : __pyx_t_2 = __pyx_t_1;
29208 8395 : for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
29209 8392 : __pyx_v_i = __pyx_t_3;
29210 :
29211 : /* "scipy/stats/_sobol.pyx":420
29212 : * cdef int n_p = p_cumulative.shape[0]
29213 : * for i in range(draws.shape[0]):
29214 : * j = _find_index(p_cumulative, n_p, draws[i]) # <<<<<<<<<<<<<<
29215 : * result[j] = result[j] + 1
29216 : *
29217 : */
29218 8392 : __pyx_t_4 = __pyx_v_i;
29219 16784 : __pyx_v_j = __pyx_f_5scipy_5stats_6_sobol__find_index(__pyx_v_p_cumulative, __pyx_v_n_p, (*((__pyx_t_5numpy_float_t const *) ( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float_t const *) __pyx_v_draws.data) + __pyx_t_4)) ))));
29220 :
29221 : /* "scipy/stats/_sobol.pyx":421
29222 : * for i in range(draws.shape[0]):
29223 : * j = _find_index(p_cumulative, n_p, draws[i])
29224 : * result[j] = result[j] + 1 # <<<<<<<<<<<<<<
29225 : *
29226 : *
29227 : */
29228 8392 : __pyx_t_4 = __pyx_v_j;
29229 8392 : __pyx_t_5 = __pyx_v_j;
29230 8392 : *((__pyx_t_5numpy_intp_t *) ( /* dim=0 */ ((char *) (((__pyx_t_5numpy_intp_t *) __pyx_v_result.data) + __pyx_t_5)) )) = ((*((__pyx_t_5numpy_intp_t *) ( /* dim=0 */ ((char *) (((__pyx_t_5numpy_intp_t *) __pyx_v_result.data) + __pyx_t_4)) ))) + 1);
29231 : }
29232 :
29233 : /* "scipy/stats/_sobol.pyx":414
29234 : * @cython.boundscheck(False)
29235 : * @cython.wraparound(False)
29236 : * cpdef void _categorize(const cnp.float_t[::1] draws, # <<<<<<<<<<<<<<
29237 : * const cnp.float_t[::1] p_cumulative,
29238 : * cnp.intp_t[::1] result) noexcept nogil:
29239 : */
29240 :
29241 : /* function exit code */
29242 3 : }
29243 :
29244 : /* Python wrapper */
29245 : static PyObject *__pyx_pw_5scipy_5stats_6_sobol_15_categorize(PyObject *__pyx_self,
29246 : #if CYTHON_METH_FASTCALL
29247 : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
29248 : #else
29249 : PyObject *__pyx_args, PyObject *__pyx_kwds
29250 : #endif
29251 : ); /*proto*/
29252 : static PyMethodDef __pyx_mdef_5scipy_5stats_6_sobol_15_categorize = {"_categorize", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5scipy_5stats_6_sobol_15_categorize, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
29253 3 : static PyObject *__pyx_pw_5scipy_5stats_6_sobol_15_categorize(PyObject *__pyx_self,
29254 : #if CYTHON_METH_FASTCALL
29255 : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
29256 : #else
29257 : PyObject *__pyx_args, PyObject *__pyx_kwds
29258 : #endif
29259 : ) {
29260 3 : __Pyx_memviewslice __pyx_v_draws = { 0, 0, { 0 }, { 0 }, { 0 } };
29261 3 : __Pyx_memviewslice __pyx_v_p_cumulative = { 0, 0, { 0 }, { 0 }, { 0 } };
29262 3 : __Pyx_memviewslice __pyx_v_result = { 0, 0, { 0 }, { 0 }, { 0 } };
29263 : #if !CYTHON_METH_FASTCALL
29264 : CYTHON_UNUSED Py_ssize_t __pyx_nargs;
29265 : #endif
29266 3 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
29267 3 : PyObject* values[3] = {0,0,0};
29268 3 : int __pyx_lineno = 0;
29269 3 : const char *__pyx_filename = NULL;
29270 3 : int __pyx_clineno = 0;
29271 3 : PyObject *__pyx_r = 0;
29272 : __Pyx_RefNannyDeclarations
29273 3 : __Pyx_RefNannySetupContext("_categorize (wrapper)", 0);
29274 : #if !CYTHON_METH_FASTCALL
29275 : #if CYTHON_ASSUME_SAFE_MACROS
29276 : __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
29277 : #else
29278 : __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
29279 : #endif
29280 : #endif
29281 3 : __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
29282 : {
29283 3 : PyObject **__pyx_pyargnames[] = {&__pyx_n_s_draws,&__pyx_n_s_p_cumulative,&__pyx_n_s_result,0};
29284 3 : if (__pyx_kwds) {
29285 0 : Py_ssize_t kw_args;
29286 0 : switch (__pyx_nargs) {
29287 0 : case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
29288 0 : CYTHON_FALLTHROUGH;
29289 0 : case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
29290 0 : CYTHON_FALLTHROUGH;
29291 0 : case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
29292 0 : CYTHON_FALLTHROUGH;
29293 0 : case 0: break;
29294 0 : default: goto __pyx_L5_argtuple_error;
29295 : }
29296 0 : kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
29297 0 : switch (__pyx_nargs) {
29298 0 : case 0:
29299 0 : if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_draws)) != 0)) {
29300 0 : (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
29301 0 : kw_args--;
29302 : }
29303 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 414, __pyx_L3_error)
29304 0 : else goto __pyx_L5_argtuple_error;
29305 0 : CYTHON_FALLTHROUGH;
29306 : case 1:
29307 0 : if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_p_cumulative)) != 0)) {
29308 0 : (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
29309 0 : kw_args--;
29310 : }
29311 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 414, __pyx_L3_error)
29312 : else {
29313 0 : __Pyx_RaiseArgtupleInvalid("_categorize", 1, 3, 3, 1); __PYX_ERR(0, 414, __pyx_L3_error)
29314 : }
29315 0 : CYTHON_FALLTHROUGH;
29316 : case 2:
29317 0 : if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_result)) != 0)) {
29318 0 : (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
29319 0 : kw_args--;
29320 : }
29321 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 414, __pyx_L3_error)
29322 : else {
29323 0 : __Pyx_RaiseArgtupleInvalid("_categorize", 1, 3, 3, 2); __PYX_ERR(0, 414, __pyx_L3_error)
29324 : }
29325 : }
29326 0 : if (unlikely(kw_args > 0)) {
29327 0 : const Py_ssize_t kwd_pos_args = __pyx_nargs;
29328 0 : if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_categorize") < 0)) __PYX_ERR(0, 414, __pyx_L3_error)
29329 : }
29330 3 : } else if (unlikely(__pyx_nargs != 3)) {
29331 0 : goto __pyx_L5_argtuple_error;
29332 : } else {
29333 3 : values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
29334 3 : values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
29335 3 : values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
29336 : }
29337 3 : __pyx_v_draws = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_float_t__const__(values[0], 0); if (unlikely(!__pyx_v_draws.memview)) __PYX_ERR(0, 414, __pyx_L3_error)
29338 3 : __pyx_v_p_cumulative = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_float_t__const__(values[1], 0); if (unlikely(!__pyx_v_p_cumulative.memview)) __PYX_ERR(0, 415, __pyx_L3_error)
29339 3 : __pyx_v_result = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_intp_t(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_result.memview)) __PYX_ERR(0, 416, __pyx_L3_error)
29340 : }
29341 3 : goto __pyx_L6_skip;
29342 0 : __pyx_L5_argtuple_error:;
29343 0 : __Pyx_RaiseArgtupleInvalid("_categorize", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 414, __pyx_L3_error)
29344 3 : __pyx_L6_skip:;
29345 3 : goto __pyx_L4_argument_unpacking_done;
29346 0 : __pyx_L3_error:;
29347 : {
29348 0 : Py_ssize_t __pyx_temp;
29349 0 : for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
29350 : __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
29351 : }
29352 : }
29353 0 : __PYX_XCLEAR_MEMVIEW(&__pyx_v_draws, 1);
29354 0 : __PYX_XCLEAR_MEMVIEW(&__pyx_v_p_cumulative, 1);
29355 0 : __PYX_XCLEAR_MEMVIEW(&__pyx_v_result, 1);
29356 0 : __Pyx_AddTraceback("scipy.stats._sobol._categorize", __pyx_clineno, __pyx_lineno, __pyx_filename);
29357 0 : __Pyx_RefNannyFinishContext();
29358 0 : return NULL;
29359 3 : __pyx_L4_argument_unpacking_done:;
29360 3 : __pyx_r = __pyx_pf_5scipy_5stats_6_sobol_14_categorize(__pyx_self, __pyx_v_draws, __pyx_v_p_cumulative, __pyx_v_result);
29361 :
29362 : /* function exit code */
29363 3 : __PYX_XCLEAR_MEMVIEW(&__pyx_v_draws, 1);
29364 3 : __PYX_XCLEAR_MEMVIEW(&__pyx_v_p_cumulative, 1);
29365 3 : __PYX_XCLEAR_MEMVIEW(&__pyx_v_result, 1);
29366 : {
29367 3 : Py_ssize_t __pyx_temp;
29368 3 : for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
29369 : __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
29370 : }
29371 : }
29372 : __Pyx_RefNannyFinishContext();
29373 : return __pyx_r;
29374 : }
29375 :
29376 3 : static PyObject *__pyx_pf_5scipy_5stats_6_sobol_14_categorize(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_draws, __Pyx_memviewslice __pyx_v_p_cumulative, __Pyx_memviewslice __pyx_v_result) {
29377 3 : PyObject *__pyx_r = NULL;
29378 : __Pyx_RefNannyDeclarations
29379 3 : PyObject *__pyx_t_1 = NULL;
29380 3 : int __pyx_lineno = 0;
29381 3 : const char *__pyx_filename = NULL;
29382 3 : int __pyx_clineno = 0;
29383 3 : __Pyx_RefNannySetupContext("_categorize", 1);
29384 3 : __Pyx_XDECREF(__pyx_r);
29385 3 : if (unlikely(!__pyx_v_draws.memview)) { __Pyx_RaiseUnboundLocalError("draws"); __PYX_ERR(0, 414, __pyx_L1_error) }
29386 3 : if (unlikely(!__pyx_v_p_cumulative.memview)) { __Pyx_RaiseUnboundLocalError("p_cumulative"); __PYX_ERR(0, 414, __pyx_L1_error) }
29387 3 : if (unlikely(!__pyx_v_result.memview)) { __Pyx_RaiseUnboundLocalError("result"); __PYX_ERR(0, 414, __pyx_L1_error) }
29388 3 : __pyx_t_1 = __Pyx_void_to_None(__pyx_f_5scipy_5stats_6_sobol__categorize(__pyx_v_draws, __pyx_v_p_cumulative, __pyx_v_result, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 414, __pyx_L1_error)
29389 3 : __Pyx_GOTREF(__pyx_t_1);
29390 3 : __pyx_r = __pyx_t_1;
29391 3 : __pyx_t_1 = 0;
29392 3 : goto __pyx_L0;
29393 :
29394 : /* function exit code */
29395 0 : __pyx_L1_error:;
29396 0 : __Pyx_XDECREF(__pyx_t_1);
29397 0 : __Pyx_AddTraceback("scipy.stats._sobol._categorize", __pyx_clineno, __pyx_lineno, __pyx_filename);
29398 0 : __pyx_r = NULL;
29399 3 : __pyx_L0:;
29400 3 : __Pyx_XGIVEREF(__pyx_r);
29401 3 : __Pyx_RefNannyFinishContext();
29402 3 : return __pyx_r;
29403 : }
29404 :
29405 : /* "scipy/stats/_sobol.pyx":426
29406 : * @cython.boundscheck(False)
29407 : * @cython.wraparound(False)
29408 : * cdef int _find_index(const cnp.float_t[::1] p_cumulative, # <<<<<<<<<<<<<<
29409 : * const int size,
29410 : * const float value) noexcept nogil:
29411 : */
29412 :
29413 8397 : static int __pyx_f_5scipy_5stats_6_sobol__find_index(__Pyx_memviewslice __pyx_v_p_cumulative, int const __pyx_v_size, float const __pyx_v_value) {
29414 8397 : int __pyx_v_l;
29415 8397 : int __pyx_v_r;
29416 8397 : int __pyx_v_m;
29417 8397 : int __pyx_r;
29418 8397 : int __pyx_t_1;
29419 8397 : Py_ssize_t __pyx_t_2;
29420 :
29421 : /* "scipy/stats/_sobol.pyx":429
29422 : * const int size,
29423 : * const float value) noexcept nogil:
29424 : * cdef int l = 0 # <<<<<<<<<<<<<<
29425 : * cdef int r = size - 1
29426 : * cdef int m
29427 : */
29428 8397 : __pyx_v_l = 0;
29429 :
29430 : /* "scipy/stats/_sobol.pyx":430
29431 : * const float value) noexcept nogil:
29432 : * cdef int l = 0
29433 : * cdef int r = size - 1 # <<<<<<<<<<<<<<
29434 : * cdef int m
29435 : * while r > l:
29436 : */
29437 8392 : __pyx_v_r = (__pyx_v_size - 1);
29438 :
29439 : /* "scipy/stats/_sobol.pyx":432
29440 : * cdef int r = size - 1
29441 : * cdef int m
29442 : * while r > l: # <<<<<<<<<<<<<<
29443 : * m = (l + r) // 2
29444 : * if value > p_cumulative[m]:
29445 : */
29446 28386 : while (1) {
29447 28386 : __pyx_t_1 = (__pyx_v_r > __pyx_v_l);
29448 28386 : if (!__pyx_t_1) break;
29449 :
29450 : /* "scipy/stats/_sobol.pyx":433
29451 : * cdef int m
29452 : * while r > l:
29453 : * m = (l + r) // 2 # <<<<<<<<<<<<<<
29454 : * if value > p_cumulative[m]:
29455 : * l = m + 1
29456 : */
29457 19989 : __pyx_v_m = ((__pyx_v_l + __pyx_v_r) / 2);
29458 :
29459 : /* "scipy/stats/_sobol.pyx":434
29460 : * while r > l:
29461 : * m = (l + r) // 2
29462 : * if value > p_cumulative[m]: # <<<<<<<<<<<<<<
29463 : * l = m + 1
29464 : * else:
29465 : */
29466 19989 : __pyx_t_2 = __pyx_v_m;
29467 19989 : __pyx_t_1 = (__pyx_v_value > (*((__pyx_t_5numpy_float_t const *) ( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float_t const *) __pyx_v_p_cumulative.data) + __pyx_t_2)) ))));
29468 19989 : if (__pyx_t_1) {
29469 :
29470 : /* "scipy/stats/_sobol.pyx":435
29471 : * m = (l + r) // 2
29472 : * if value > p_cumulative[m]:
29473 : * l = m + 1 # <<<<<<<<<<<<<<
29474 : * else:
29475 : * r = m
29476 : */
29477 9240 : __pyx_v_l = (__pyx_v_m + 1);
29478 :
29479 : /* "scipy/stats/_sobol.pyx":434
29480 : * while r > l:
29481 : * m = (l + r) // 2
29482 : * if value > p_cumulative[m]: # <<<<<<<<<<<<<<
29483 : * l = m + 1
29484 : * else:
29485 : */
29486 9240 : goto __pyx_L5;
29487 : }
29488 :
29489 : /* "scipy/stats/_sobol.pyx":437
29490 : * l = m + 1
29491 : * else:
29492 : * r = m # <<<<<<<<<<<<<<
29493 : * return r
29494 : *
29495 : */
29496 : /*else*/ {
29497 : __pyx_v_r = __pyx_v_m;
29498 : }
29499 17637 : __pyx_L5:;
29500 : }
29501 :
29502 : /* "scipy/stats/_sobol.pyx":438
29503 : * else:
29504 : * r = m
29505 : * return r # <<<<<<<<<<<<<<
29506 : *
29507 : *
29508 : */
29509 8397 : __pyx_r = __pyx_v_r;
29510 8397 : goto __pyx_L0;
29511 :
29512 : /* "scipy/stats/_sobol.pyx":426
29513 : * @cython.boundscheck(False)
29514 : * @cython.wraparound(False)
29515 : * cdef int _find_index(const cnp.float_t[::1] p_cumulative, # <<<<<<<<<<<<<<
29516 : * const int size,
29517 : * const float value) noexcept nogil:
29518 : */
29519 :
29520 : /* function exit code */
29521 8397 : __pyx_L0:;
29522 8392 : return __pyx_r;
29523 : }
29524 :
29525 : /* "scipy/stats/_sobol.pyx":441
29526 : *
29527 : *
29528 : * def _test_find_index(p_cumulative, size, value): # <<<<<<<<<<<<<<
29529 : * # type: (np.ndarray, int, float) -> int
29530 : * """Wrapper for testing in python"""
29531 : */
29532 :
29533 : /* Python wrapper */
29534 : static PyObject *__pyx_pw_5scipy_5stats_6_sobol_17_test_find_index(PyObject *__pyx_self,
29535 : #if CYTHON_METH_FASTCALL
29536 : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
29537 : #else
29538 : PyObject *__pyx_args, PyObject *__pyx_kwds
29539 : #endif
29540 : ); /*proto*/
29541 : PyDoc_STRVAR(__pyx_doc_5scipy_5stats_6_sobol_16_test_find_index, "Wrapper for testing in python");
29542 : static PyMethodDef __pyx_mdef_5scipy_5stats_6_sobol_17_test_find_index = {"_test_find_index", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5scipy_5stats_6_sobol_17_test_find_index, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5scipy_5stats_6_sobol_16_test_find_index};
29543 5 : static PyObject *__pyx_pw_5scipy_5stats_6_sobol_17_test_find_index(PyObject *__pyx_self,
29544 : #if CYTHON_METH_FASTCALL
29545 : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
29546 : #else
29547 : PyObject *__pyx_args, PyObject *__pyx_kwds
29548 : #endif
29549 : ) {
29550 5 : PyObject *__pyx_v_p_cumulative = 0;
29551 5 : PyObject *__pyx_v_size = 0;
29552 5 : PyObject *__pyx_v_value = 0;
29553 : #if !CYTHON_METH_FASTCALL
29554 : CYTHON_UNUSED Py_ssize_t __pyx_nargs;
29555 : #endif
29556 5 : CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
29557 5 : PyObject* values[3] = {0,0,0};
29558 5 : int __pyx_lineno = 0;
29559 5 : const char *__pyx_filename = NULL;
29560 5 : int __pyx_clineno = 0;
29561 5 : PyObject *__pyx_r = 0;
29562 : __Pyx_RefNannyDeclarations
29563 5 : __Pyx_RefNannySetupContext("_test_find_index (wrapper)", 0);
29564 : #if !CYTHON_METH_FASTCALL
29565 : #if CYTHON_ASSUME_SAFE_MACROS
29566 : __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
29567 : #else
29568 : __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
29569 : #endif
29570 : #endif
29571 5 : __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
29572 : {
29573 5 : PyObject **__pyx_pyargnames[] = {&__pyx_n_s_p_cumulative,&__pyx_n_s_size,&__pyx_n_s_value,0};
29574 5 : if (__pyx_kwds) {
29575 0 : Py_ssize_t kw_args;
29576 0 : switch (__pyx_nargs) {
29577 0 : case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
29578 0 : CYTHON_FALLTHROUGH;
29579 0 : case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
29580 0 : CYTHON_FALLTHROUGH;
29581 0 : case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
29582 0 : CYTHON_FALLTHROUGH;
29583 0 : case 0: break;
29584 0 : default: goto __pyx_L5_argtuple_error;
29585 : }
29586 0 : kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
29587 0 : switch (__pyx_nargs) {
29588 0 : case 0:
29589 0 : if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_p_cumulative)) != 0)) {
29590 0 : (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
29591 0 : kw_args--;
29592 : }
29593 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 441, __pyx_L3_error)
29594 0 : else goto __pyx_L5_argtuple_error;
29595 0 : CYTHON_FALLTHROUGH;
29596 : case 1:
29597 0 : if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_size)) != 0)) {
29598 0 : (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
29599 0 : kw_args--;
29600 : }
29601 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 441, __pyx_L3_error)
29602 : else {
29603 0 : __Pyx_RaiseArgtupleInvalid("_test_find_index", 1, 3, 3, 1); __PYX_ERR(0, 441, __pyx_L3_error)
29604 : }
29605 0 : CYTHON_FALLTHROUGH;
29606 : case 2:
29607 0 : if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_value)) != 0)) {
29608 0 : (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
29609 0 : kw_args--;
29610 : }
29611 0 : else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 441, __pyx_L3_error)
29612 : else {
29613 0 : __Pyx_RaiseArgtupleInvalid("_test_find_index", 1, 3, 3, 2); __PYX_ERR(0, 441, __pyx_L3_error)
29614 : }
29615 : }
29616 0 : if (unlikely(kw_args > 0)) {
29617 0 : const Py_ssize_t kwd_pos_args = __pyx_nargs;
29618 0 : if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_test_find_index") < 0)) __PYX_ERR(0, 441, __pyx_L3_error)
29619 : }
29620 5 : } else if (unlikely(__pyx_nargs != 3)) {
29621 0 : goto __pyx_L5_argtuple_error;
29622 : } else {
29623 5 : values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
29624 5 : values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
29625 5 : values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
29626 : }
29627 5 : __pyx_v_p_cumulative = values[0];
29628 5 : __pyx_v_size = values[1];
29629 5 : __pyx_v_value = values[2];
29630 : }
29631 5 : goto __pyx_L6_skip;
29632 0 : __pyx_L5_argtuple_error:;
29633 0 : __Pyx_RaiseArgtupleInvalid("_test_find_index", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 441, __pyx_L3_error)
29634 5 : __pyx_L6_skip:;
29635 5 : goto __pyx_L4_argument_unpacking_done;
29636 0 : __pyx_L3_error:;
29637 : {
29638 0 : Py_ssize_t __pyx_temp;
29639 0 : for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
29640 : __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
29641 : }
29642 : }
29643 0 : __Pyx_AddTraceback("scipy.stats._sobol._test_find_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
29644 0 : __Pyx_RefNannyFinishContext();
29645 0 : return NULL;
29646 5 : __pyx_L4_argument_unpacking_done:;
29647 5 : __pyx_r = __pyx_pf_5scipy_5stats_6_sobol_16_test_find_index(__pyx_self, __pyx_v_p_cumulative, __pyx_v_size, __pyx_v_value);
29648 :
29649 : /* function exit code */
29650 : {
29651 5 : Py_ssize_t __pyx_temp;
29652 5 : for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
29653 : __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
29654 : }
29655 : }
29656 : __Pyx_RefNannyFinishContext();
29657 : return __pyx_r;
29658 : }
29659 :
29660 5 : static PyObject *__pyx_pf_5scipy_5stats_6_sobol_16_test_find_index(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p_cumulative, PyObject *__pyx_v_size, PyObject *__pyx_v_value) {
29661 5 : PyObject *__pyx_r = NULL;
29662 : __Pyx_RefNannyDeclarations
29663 5 : __Pyx_memviewslice __pyx_t_1 = { 0, 0, { 0 }, { 0 }, { 0 } };
29664 5 : int __pyx_t_2;
29665 5 : float __pyx_t_3;
29666 5 : PyObject *__pyx_t_4 = NULL;
29667 5 : int __pyx_lineno = 0;
29668 5 : const char *__pyx_filename = NULL;
29669 5 : int __pyx_clineno = 0;
29670 5 : __Pyx_RefNannySetupContext("_test_find_index", 1);
29671 :
29672 : /* "scipy/stats/_sobol.pyx":444
29673 : * # type: (np.ndarray, int, float) -> int
29674 : * """Wrapper for testing in python"""
29675 : * return _find_index(p_cumulative, size, value) # <<<<<<<<<<<<<<
29676 : */
29677 5 : __Pyx_XDECREF(__pyx_r);
29678 5 : __pyx_t_1 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_float_t__const__(__pyx_v_p_cumulative, 0); if (unlikely(!__pyx_t_1.memview)) __PYX_ERR(0, 444, __pyx_L1_error)
29679 5 : __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_v_size); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 444, __pyx_L1_error)
29680 5 : __pyx_t_3 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_3 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 444, __pyx_L1_error)
29681 10 : __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_f_5scipy_5stats_6_sobol__find_index(__pyx_t_1, __pyx_t_2, __pyx_t_3)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 444, __pyx_L1_error)
29682 5 : __Pyx_GOTREF(__pyx_t_4);
29683 5 : __PYX_XCLEAR_MEMVIEW(&__pyx_t_1, 1);
29684 5 : __pyx_t_1.memview = NULL; __pyx_t_1.data = NULL;
29685 5 : __pyx_r = __pyx_t_4;
29686 5 : __pyx_t_4 = 0;
29687 5 : goto __pyx_L0;
29688 :
29689 : /* "scipy/stats/_sobol.pyx":441
29690 : *
29691 : *
29692 : * def _test_find_index(p_cumulative, size, value): # <<<<<<<<<<<<<<
29693 : * # type: (np.ndarray, int, float) -> int
29694 : * """Wrapper for testing in python"""
29695 : */
29696 :
29697 : /* function exit code */
29698 0 : __pyx_L1_error:;
29699 0 : __PYX_XCLEAR_MEMVIEW(&__pyx_t_1, 1);
29700 0 : __Pyx_XDECREF(__pyx_t_4);
29701 0 : __Pyx_AddTraceback("scipy.stats._sobol._test_find_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
29702 0 : __pyx_r = NULL;
29703 5 : __pyx_L0:;
29704 5 : __Pyx_XGIVEREF(__pyx_r);
29705 5 : __Pyx_RefNannyFinishContext();
29706 5 : return __pyx_r;
29707 : }
29708 : static struct __pyx_vtabstruct_array __pyx_vtable_array;
29709 :
29710 0 : static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k) {
29711 0 : struct __pyx_array_obj *p;
29712 0 : PyObject *o;
29713 : #if CYTHON_COMPILING_IN_LIMITED_API
29714 : allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
29715 : o = alloc_func(t, 0);
29716 : #else
29717 0 : if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
29718 0 : o = (*t->tp_alloc)(t, 0);
29719 : } else {
29720 0 : o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
29721 : }
29722 0 : if (unlikely(!o)) return 0;
29723 : #endif
29724 0 : p = ((struct __pyx_array_obj *)o);
29725 0 : p->__pyx_vtab = __pyx_vtabptr_array;
29726 0 : p->mode = ((PyObject*)Py_None); Py_INCREF(Py_None);
29727 0 : p->_format = ((PyObject*)Py_None); Py_INCREF(Py_None);
29728 0 : if (unlikely(__pyx_array___cinit__(o, a, k) < 0)) goto bad;
29729 : return o;
29730 0 : bad:
29731 0 : Py_DECREF(o); o = 0;
29732 : return NULL;
29733 : }
29734 :
29735 0 : static void __pyx_tp_dealloc_array(PyObject *o) {
29736 0 : struct __pyx_array_obj *p = (struct __pyx_array_obj *)o;
29737 : #if CYTHON_USE_TP_FINALIZE
29738 0 : if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
29739 0 : if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_array) {
29740 0 : if (PyObject_CallFinalizerFromDealloc(o)) return;
29741 : }
29742 : }
29743 : #endif
29744 : {
29745 0 : PyObject *etype, *eval, *etb;
29746 0 : PyErr_Fetch(&etype, &eval, &etb);
29747 0 : __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
29748 0 : __pyx_array___dealloc__(o);
29749 0 : __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
29750 0 : PyErr_Restore(etype, eval, etb);
29751 : }
29752 0 : Py_CLEAR(p->mode);
29753 0 : Py_CLEAR(p->_format);
29754 : #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
29755 0 : (*Py_TYPE(o)->tp_free)(o);
29756 : #else
29757 : {
29758 : freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
29759 : if (tp_free) tp_free(o);
29760 : }
29761 : #endif
29762 : }
29763 0 : static PyObject *__pyx_sq_item_array(PyObject *o, Py_ssize_t i) {
29764 0 : PyObject *r;
29765 0 : PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
29766 0 : r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
29767 0 : Py_DECREF(x);
29768 : return r;
29769 : }
29770 :
29771 0 : static int __pyx_mp_ass_subscript_array(PyObject *o, PyObject *i, PyObject *v) {
29772 0 : if (v) {
29773 0 : return __pyx_array___setitem__(o, i, v);
29774 : }
29775 : else {
29776 0 : __Pyx_TypeName o_type_name;
29777 0 : o_type_name = __Pyx_PyType_GetName(Py_TYPE(o));
29778 0 : PyErr_Format(PyExc_NotImplementedError,
29779 : "Subscript deletion not supported by " __Pyx_FMT_TYPENAME, o_type_name);
29780 0 : __Pyx_DECREF_TypeName(o_type_name);
29781 0 : return -1;
29782 : }
29783 : }
29784 :
29785 0 : static PyObject *__pyx_tp_getattro_array(PyObject *o, PyObject *n) {
29786 0 : PyObject *v = __Pyx_PyObject_GenericGetAttr(o, n);
29787 0 : if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
29788 0 : PyErr_Clear();
29789 0 : v = __pyx_array___getattr__(o, n);
29790 : }
29791 0 : return v;
29792 : }
29793 :
29794 0 : static PyObject *__pyx_getprop___pyx_array_memview(PyObject *o, CYTHON_UNUSED void *x) {
29795 0 : return __pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(o);
29796 : }
29797 :
29798 : static PyMethodDef __pyx_methods_array[] = {
29799 : {"__getattr__", (PyCFunction)__pyx_array___getattr__, METH_O|METH_COEXIST, 0},
29800 : {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_array_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
29801 : {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_array_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
29802 : {0, 0, 0, 0}
29803 : };
29804 :
29805 : static struct PyGetSetDef __pyx_getsets_array[] = {
29806 : {(char *)"memview", __pyx_getprop___pyx_array_memview, 0, (char *)0, 0},
29807 : {0, 0, 0, 0, 0}
29808 : };
29809 : #if CYTHON_USE_TYPE_SPECS
29810 : #if !CYTHON_COMPILING_IN_LIMITED_API
29811 :
29812 : static PyBufferProcs __pyx_tp_as_buffer_array = {
29813 : #if PY_MAJOR_VERSION < 3
29814 : 0, /*bf_getreadbuffer*/
29815 : #endif
29816 : #if PY_MAJOR_VERSION < 3
29817 : 0, /*bf_getwritebuffer*/
29818 : #endif
29819 : #if PY_MAJOR_VERSION < 3
29820 : 0, /*bf_getsegcount*/
29821 : #endif
29822 : #if PY_MAJOR_VERSION < 3
29823 : 0, /*bf_getcharbuffer*/
29824 : #endif
29825 : __pyx_array_getbuffer, /*bf_getbuffer*/
29826 : 0, /*bf_releasebuffer*/
29827 : };
29828 : #endif
29829 : static PyType_Slot __pyx_type___pyx_array_slots[] = {
29830 : {Py_tp_dealloc, (void *)__pyx_tp_dealloc_array},
29831 : {Py_sq_length, (void *)__pyx_array___len__},
29832 : {Py_sq_item, (void *)__pyx_sq_item_array},
29833 : {Py_mp_length, (void *)__pyx_array___len__},
29834 : {Py_mp_subscript, (void *)__pyx_array___getitem__},
29835 : {Py_mp_ass_subscript, (void *)__pyx_mp_ass_subscript_array},
29836 : {Py_tp_getattro, (void *)__pyx_tp_getattro_array},
29837 : #if defined(Py_bf_getbuffer)
29838 : {Py_bf_getbuffer, (void *)__pyx_array_getbuffer},
29839 : #endif
29840 : {Py_tp_methods, (void *)__pyx_methods_array},
29841 : {Py_tp_getset, (void *)__pyx_getsets_array},
29842 : {Py_tp_new, (void *)__pyx_tp_new_array},
29843 : {0, 0},
29844 : };
29845 : static PyType_Spec __pyx_type___pyx_array_spec = {
29846 : "scipy.stats._sobol.array",
29847 : sizeof(struct __pyx_array_obj),
29848 : 0,
29849 : Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_SEQUENCE,
29850 : __pyx_type___pyx_array_slots,
29851 : };
29852 : #else
29853 :
29854 : static PySequenceMethods __pyx_tp_as_sequence_array = {
29855 : __pyx_array___len__, /*sq_length*/
29856 : 0, /*sq_concat*/
29857 : 0, /*sq_repeat*/
29858 : __pyx_sq_item_array, /*sq_item*/
29859 : 0, /*sq_slice*/
29860 : 0, /*sq_ass_item*/
29861 : 0, /*sq_ass_slice*/
29862 : 0, /*sq_contains*/
29863 : 0, /*sq_inplace_concat*/
29864 : 0, /*sq_inplace_repeat*/
29865 : };
29866 :
29867 : static PyMappingMethods __pyx_tp_as_mapping_array = {
29868 : __pyx_array___len__, /*mp_length*/
29869 : __pyx_array___getitem__, /*mp_subscript*/
29870 : __pyx_mp_ass_subscript_array, /*mp_ass_subscript*/
29871 : };
29872 :
29873 : static PyBufferProcs __pyx_tp_as_buffer_array = {
29874 : #if PY_MAJOR_VERSION < 3
29875 : 0, /*bf_getreadbuffer*/
29876 : #endif
29877 : #if PY_MAJOR_VERSION < 3
29878 : 0, /*bf_getwritebuffer*/
29879 : #endif
29880 : #if PY_MAJOR_VERSION < 3
29881 : 0, /*bf_getsegcount*/
29882 : #endif
29883 : #if PY_MAJOR_VERSION < 3
29884 : 0, /*bf_getcharbuffer*/
29885 : #endif
29886 : __pyx_array_getbuffer, /*bf_getbuffer*/
29887 : 0, /*bf_releasebuffer*/
29888 : };
29889 :
29890 : static PyTypeObject __pyx_type___pyx_array = {
29891 : PyVarObject_HEAD_INIT(0, 0)
29892 : "scipy.stats._sobol.""array", /*tp_name*/
29893 : sizeof(struct __pyx_array_obj), /*tp_basicsize*/
29894 : 0, /*tp_itemsize*/
29895 : __pyx_tp_dealloc_array, /*tp_dealloc*/
29896 : #if PY_VERSION_HEX < 0x030800b4
29897 : 0, /*tp_print*/
29898 : #endif
29899 : #if PY_VERSION_HEX >= 0x030800b4
29900 : 0, /*tp_vectorcall_offset*/
29901 : #endif
29902 : 0, /*tp_getattr*/
29903 : 0, /*tp_setattr*/
29904 : #if PY_MAJOR_VERSION < 3
29905 : 0, /*tp_compare*/
29906 : #endif
29907 : #if PY_MAJOR_VERSION >= 3
29908 : 0, /*tp_as_async*/
29909 : #endif
29910 : 0, /*tp_repr*/
29911 : 0, /*tp_as_number*/
29912 : &__pyx_tp_as_sequence_array, /*tp_as_sequence*/
29913 : &__pyx_tp_as_mapping_array, /*tp_as_mapping*/
29914 : 0, /*tp_hash*/
29915 : 0, /*tp_call*/
29916 : 0, /*tp_str*/
29917 : __pyx_tp_getattro_array, /*tp_getattro*/
29918 : 0, /*tp_setattro*/
29919 : &__pyx_tp_as_buffer_array, /*tp_as_buffer*/
29920 : Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_SEQUENCE, /*tp_flags*/
29921 : 0, /*tp_doc*/
29922 : 0, /*tp_traverse*/
29923 : 0, /*tp_clear*/
29924 : 0, /*tp_richcompare*/
29925 : 0, /*tp_weaklistoffset*/
29926 : 0, /*tp_iter*/
29927 : 0, /*tp_iternext*/
29928 : __pyx_methods_array, /*tp_methods*/
29929 : 0, /*tp_members*/
29930 : __pyx_getsets_array, /*tp_getset*/
29931 : 0, /*tp_base*/
29932 : 0, /*tp_dict*/
29933 : 0, /*tp_descr_get*/
29934 : 0, /*tp_descr_set*/
29935 : #if !CYTHON_USE_TYPE_SPECS
29936 : 0, /*tp_dictoffset*/
29937 : #endif
29938 : 0, /*tp_init*/
29939 : 0, /*tp_alloc*/
29940 : __pyx_tp_new_array, /*tp_new*/
29941 : 0, /*tp_free*/
29942 : 0, /*tp_is_gc*/
29943 : 0, /*tp_bases*/
29944 : 0, /*tp_mro*/
29945 : 0, /*tp_cache*/
29946 : 0, /*tp_subclasses*/
29947 : 0, /*tp_weaklist*/
29948 : 0, /*tp_del*/
29949 : 0, /*tp_version_tag*/
29950 : #if PY_VERSION_HEX >= 0x030400a1
29951 : #if CYTHON_USE_TP_FINALIZE
29952 : 0, /*tp_finalize*/
29953 : #else
29954 : NULL, /*tp_finalize*/
29955 : #endif
29956 : #endif
29957 : #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
29958 : 0, /*tp_vectorcall*/
29959 : #endif
29960 : #if __PYX_NEED_TP_PRINT_SLOT == 1
29961 : 0, /*tp_print*/
29962 : #endif
29963 : #if PY_VERSION_HEX >= 0x030C0000
29964 : 0, /*tp_watched*/
29965 : #endif
29966 : #if PY_VERSION_HEX >= 0x030d00A4
29967 : 0, /*tp_versions_used*/
29968 : #endif
29969 : #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
29970 : 0, /*tp_pypy_flags*/
29971 : #endif
29972 : };
29973 : #endif
29974 :
29975 15 : static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
29976 15 : struct __pyx_MemviewEnum_obj *p;
29977 15 : PyObject *o;
29978 : #if CYTHON_COMPILING_IN_LIMITED_API
29979 : allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
29980 : o = alloc_func(t, 0);
29981 : #else
29982 15 : if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
29983 15 : o = (*t->tp_alloc)(t, 0);
29984 : } else {
29985 0 : o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
29986 : }
29987 15 : if (unlikely(!o)) return 0;
29988 : #endif
29989 15 : p = ((struct __pyx_MemviewEnum_obj *)o);
29990 15 : p->name = Py_None; Py_INCREF(Py_None);
29991 : return o;
29992 : }
29993 :
29994 0 : static void __pyx_tp_dealloc_Enum(PyObject *o) {
29995 0 : struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
29996 : #if CYTHON_USE_TP_FINALIZE
29997 0 : if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
29998 0 : if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_Enum) {
29999 0 : if (PyObject_CallFinalizerFromDealloc(o)) return;
30000 : }
30001 : }
30002 : #endif
30003 0 : PyObject_GC_UnTrack(o);
30004 0 : Py_CLEAR(p->name);
30005 : #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
30006 0 : (*Py_TYPE(o)->tp_free)(o);
30007 : #else
30008 : {
30009 : freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
30010 : if (tp_free) tp_free(o);
30011 : }
30012 : #endif
30013 : }
30014 :
30015 785 : static int __pyx_tp_traverse_Enum(PyObject *o, visitproc v, void *a) {
30016 785 : int e;
30017 785 : struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
30018 785 : if (p->name) {
30019 785 : e = (*v)(p->name, a); if (e) return e;
30020 : }
30021 : return 0;
30022 : }
30023 :
30024 0 : static int __pyx_tp_clear_Enum(PyObject *o) {
30025 0 : PyObject* tmp;
30026 0 : struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
30027 0 : tmp = ((PyObject*)p->name);
30028 0 : p->name = Py_None; Py_INCREF(Py_None);
30029 0 : Py_XDECREF(tmp);
30030 0 : return 0;
30031 : }
30032 :
30033 0 : static PyObject *__pyx_specialmethod___pyx_MemviewEnum___repr__(PyObject *self, CYTHON_UNUSED PyObject *arg) {
30034 0 : return __pyx_MemviewEnum___repr__(self);
30035 : }
30036 :
30037 : static PyMethodDef __pyx_methods_Enum[] = {
30038 : {"__repr__", (PyCFunction)__pyx_specialmethod___pyx_MemviewEnum___repr__, METH_NOARGS|METH_COEXIST, 0},
30039 : {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_MemviewEnum_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
30040 : {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_MemviewEnum_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
30041 : {0, 0, 0, 0}
30042 : };
30043 : #if CYTHON_USE_TYPE_SPECS
30044 : static PyType_Slot __pyx_type___pyx_MemviewEnum_slots[] = {
30045 : {Py_tp_dealloc, (void *)__pyx_tp_dealloc_Enum},
30046 : {Py_tp_repr, (void *)__pyx_MemviewEnum___repr__},
30047 : {Py_tp_traverse, (void *)__pyx_tp_traverse_Enum},
30048 : {Py_tp_clear, (void *)__pyx_tp_clear_Enum},
30049 : {Py_tp_methods, (void *)__pyx_methods_Enum},
30050 : {Py_tp_init, (void *)__pyx_MemviewEnum___init__},
30051 : {Py_tp_new, (void *)__pyx_tp_new_Enum},
30052 : {0, 0},
30053 : };
30054 : static PyType_Spec __pyx_type___pyx_MemviewEnum_spec = {
30055 : "scipy.stats._sobol.Enum",
30056 : sizeof(struct __pyx_MemviewEnum_obj),
30057 : 0,
30058 : Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
30059 : __pyx_type___pyx_MemviewEnum_slots,
30060 : };
30061 : #else
30062 :
30063 : static PyTypeObject __pyx_type___pyx_MemviewEnum = {
30064 : PyVarObject_HEAD_INIT(0, 0)
30065 : "scipy.stats._sobol.""Enum", /*tp_name*/
30066 : sizeof(struct __pyx_MemviewEnum_obj), /*tp_basicsize*/
30067 : 0, /*tp_itemsize*/
30068 : __pyx_tp_dealloc_Enum, /*tp_dealloc*/
30069 : #if PY_VERSION_HEX < 0x030800b4
30070 : 0, /*tp_print*/
30071 : #endif
30072 : #if PY_VERSION_HEX >= 0x030800b4
30073 : 0, /*tp_vectorcall_offset*/
30074 : #endif
30075 : 0, /*tp_getattr*/
30076 : 0, /*tp_setattr*/
30077 : #if PY_MAJOR_VERSION < 3
30078 : 0, /*tp_compare*/
30079 : #endif
30080 : #if PY_MAJOR_VERSION >= 3
30081 : 0, /*tp_as_async*/
30082 : #endif
30083 : __pyx_MemviewEnum___repr__, /*tp_repr*/
30084 : 0, /*tp_as_number*/
30085 : 0, /*tp_as_sequence*/
30086 : 0, /*tp_as_mapping*/
30087 : 0, /*tp_hash*/
30088 : 0, /*tp_call*/
30089 : 0, /*tp_str*/
30090 : 0, /*tp_getattro*/
30091 : 0, /*tp_setattro*/
30092 : 0, /*tp_as_buffer*/
30093 : Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
30094 : 0, /*tp_doc*/
30095 : __pyx_tp_traverse_Enum, /*tp_traverse*/
30096 : __pyx_tp_clear_Enum, /*tp_clear*/
30097 : 0, /*tp_richcompare*/
30098 : 0, /*tp_weaklistoffset*/
30099 : 0, /*tp_iter*/
30100 : 0, /*tp_iternext*/
30101 : __pyx_methods_Enum, /*tp_methods*/
30102 : 0, /*tp_members*/
30103 : 0, /*tp_getset*/
30104 : 0, /*tp_base*/
30105 : 0, /*tp_dict*/
30106 : 0, /*tp_descr_get*/
30107 : 0, /*tp_descr_set*/
30108 : #if !CYTHON_USE_TYPE_SPECS
30109 : 0, /*tp_dictoffset*/
30110 : #endif
30111 : __pyx_MemviewEnum___init__, /*tp_init*/
30112 : 0, /*tp_alloc*/
30113 : __pyx_tp_new_Enum, /*tp_new*/
30114 : 0, /*tp_free*/
30115 : 0, /*tp_is_gc*/
30116 : 0, /*tp_bases*/
30117 : 0, /*tp_mro*/
30118 : 0, /*tp_cache*/
30119 : 0, /*tp_subclasses*/
30120 : 0, /*tp_weaklist*/
30121 : 0, /*tp_del*/
30122 : 0, /*tp_version_tag*/
30123 : #if PY_VERSION_HEX >= 0x030400a1
30124 : #if CYTHON_USE_TP_FINALIZE
30125 : 0, /*tp_finalize*/
30126 : #else
30127 : NULL, /*tp_finalize*/
30128 : #endif
30129 : #endif
30130 : #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
30131 : 0, /*tp_vectorcall*/
30132 : #endif
30133 : #if __PYX_NEED_TP_PRINT_SLOT == 1
30134 : 0, /*tp_print*/
30135 : #endif
30136 : #if PY_VERSION_HEX >= 0x030C0000
30137 : 0, /*tp_watched*/
30138 : #endif
30139 : #if PY_VERSION_HEX >= 0x030d00A4
30140 : 0, /*tp_versions_used*/
30141 : #endif
30142 : #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
30143 : 0, /*tp_pypy_flags*/
30144 : #endif
30145 : };
30146 : #endif
30147 : static struct __pyx_vtabstruct_memoryview __pyx_vtable_memoryview;
30148 :
30149 3057 : static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k) {
30150 3057 : struct __pyx_memoryview_obj *p;
30151 3057 : PyObject *o;
30152 : #if CYTHON_COMPILING_IN_LIMITED_API
30153 : allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
30154 : o = alloc_func(t, 0);
30155 : #else
30156 3057 : if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
30157 3057 : o = (*t->tp_alloc)(t, 0);
30158 : } else {
30159 0 : o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
30160 : }
30161 3057 : if (unlikely(!o)) return 0;
30162 : #endif
30163 3057 : p = ((struct __pyx_memoryview_obj *)o);
30164 3057 : p->__pyx_vtab = __pyx_vtabptr_memoryview;
30165 3057 : p->obj = Py_None; Py_INCREF(Py_None);
30166 3057 : p->_size = Py_None; Py_INCREF(Py_None);
30167 3057 : p->_array_interface = Py_None; Py_INCREF(Py_None);
30168 3057 : p->view.obj = NULL;
30169 3057 : if (unlikely(__pyx_memoryview___cinit__(o, a, k) < 0)) goto bad;
30170 : return o;
30171 0 : bad:
30172 0 : Py_DECREF(o); o = 0;
30173 : return NULL;
30174 : }
30175 :
30176 3057 : static void __pyx_tp_dealloc_memoryview(PyObject *o) {
30177 3057 : struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
30178 : #if CYTHON_USE_TP_FINALIZE
30179 3057 : if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
30180 0 : if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_memoryview) {
30181 0 : if (PyObject_CallFinalizerFromDealloc(o)) return;
30182 : }
30183 : }
30184 : #endif
30185 3057 : PyObject_GC_UnTrack(o);
30186 : {
30187 3057 : PyObject *etype, *eval, *etb;
30188 3057 : PyErr_Fetch(&etype, &eval, &etb);
30189 3057 : __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
30190 3057 : __pyx_memoryview___dealloc__(o);
30191 3057 : __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
30192 3057 : PyErr_Restore(etype, eval, etb);
30193 : }
30194 3057 : Py_CLEAR(p->obj);
30195 3057 : Py_CLEAR(p->_size);
30196 3057 : Py_CLEAR(p->_array_interface);
30197 : #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
30198 3057 : (*Py_TYPE(o)->tp_free)(o);
30199 : #else
30200 : {
30201 : freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
30202 : if (tp_free) tp_free(o);
30203 : }
30204 : #endif
30205 : }
30206 :
30207 0 : static int __pyx_tp_traverse_memoryview(PyObject *o, visitproc v, void *a) {
30208 0 : int e;
30209 0 : struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
30210 0 : if (p->obj) {
30211 0 : e = (*v)(p->obj, a); if (e) return e;
30212 : }
30213 0 : if (p->_size) {
30214 0 : e = (*v)(p->_size, a); if (e) return e;
30215 : }
30216 0 : if (p->_array_interface) {
30217 0 : e = (*v)(p->_array_interface, a); if (e) return e;
30218 : }
30219 0 : if (p->view.obj) {
30220 0 : e = (*v)(p->view.obj, a); if (e) return e;
30221 : }
30222 : return 0;
30223 : }
30224 :
30225 0 : static int __pyx_tp_clear_memoryview(PyObject *o) {
30226 0 : PyObject* tmp;
30227 0 : struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
30228 0 : tmp = ((PyObject*)p->obj);
30229 0 : p->obj = Py_None; Py_INCREF(Py_None);
30230 0 : Py_XDECREF(tmp);
30231 0 : tmp = ((PyObject*)p->_size);
30232 0 : p->_size = Py_None; Py_INCREF(Py_None);
30233 0 : Py_XDECREF(tmp);
30234 0 : tmp = ((PyObject*)p->_array_interface);
30235 0 : p->_array_interface = Py_None; Py_INCREF(Py_None);
30236 0 : Py_XDECREF(tmp);
30237 0 : Py_CLEAR(p->view.obj);
30238 0 : return 0;
30239 : }
30240 0 : static PyObject *__pyx_sq_item_memoryview(PyObject *o, Py_ssize_t i) {
30241 0 : PyObject *r;
30242 0 : PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
30243 0 : r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
30244 0 : Py_DECREF(x);
30245 : return r;
30246 : }
30247 :
30248 0 : static int __pyx_mp_ass_subscript_memoryview(PyObject *o, PyObject *i, PyObject *v) {
30249 0 : if (v) {
30250 0 : return __pyx_memoryview___setitem__(o, i, v);
30251 : }
30252 : else {
30253 0 : __Pyx_TypeName o_type_name;
30254 0 : o_type_name = __Pyx_PyType_GetName(Py_TYPE(o));
30255 0 : PyErr_Format(PyExc_NotImplementedError,
30256 : "Subscript deletion not supported by " __Pyx_FMT_TYPENAME, o_type_name);
30257 0 : __Pyx_DECREF_TypeName(o_type_name);
30258 0 : return -1;
30259 : }
30260 : }
30261 :
30262 0 : static PyObject *__pyx_getprop___pyx_memoryview_T(PyObject *o, CYTHON_UNUSED void *x) {
30263 0 : return __pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(o);
30264 : }
30265 :
30266 0 : static PyObject *__pyx_getprop___pyx_memoryview_base(PyObject *o, CYTHON_UNUSED void *x) {
30267 0 : return __pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(o);
30268 : }
30269 :
30270 0 : static PyObject *__pyx_getprop___pyx_memoryview_shape(PyObject *o, CYTHON_UNUSED void *x) {
30271 0 : return __pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(o);
30272 : }
30273 :
30274 0 : static PyObject *__pyx_getprop___pyx_memoryview_strides(PyObject *o, CYTHON_UNUSED void *x) {
30275 0 : return __pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(o);
30276 : }
30277 :
30278 0 : static PyObject *__pyx_getprop___pyx_memoryview_suboffsets(PyObject *o, CYTHON_UNUSED void *x) {
30279 0 : return __pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(o);
30280 : }
30281 :
30282 0 : static PyObject *__pyx_getprop___pyx_memoryview_ndim(PyObject *o, CYTHON_UNUSED void *x) {
30283 0 : return __pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(o);
30284 : }
30285 :
30286 0 : static PyObject *__pyx_getprop___pyx_memoryview_itemsize(PyObject *o, CYTHON_UNUSED void *x) {
30287 0 : return __pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(o);
30288 : }
30289 :
30290 0 : static PyObject *__pyx_getprop___pyx_memoryview_nbytes(PyObject *o, CYTHON_UNUSED void *x) {
30291 0 : return __pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(o);
30292 : }
30293 :
30294 0 : static PyObject *__pyx_getprop___pyx_memoryview_size(PyObject *o, CYTHON_UNUSED void *x) {
30295 0 : return __pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(o);
30296 : }
30297 :
30298 0 : static PyObject *__pyx_specialmethod___pyx_memoryview___repr__(PyObject *self, CYTHON_UNUSED PyObject *arg) {
30299 0 : return __pyx_memoryview___repr__(self);
30300 : }
30301 :
30302 : static PyMethodDef __pyx_methods_memoryview[] = {
30303 : {"__repr__", (PyCFunction)__pyx_specialmethod___pyx_memoryview___repr__, METH_NOARGS|METH_COEXIST, 0},
30304 : {"is_c_contig", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_memoryview_is_c_contig, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
30305 : {"is_f_contig", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_memoryview_is_f_contig, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
30306 : {"copy", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_memoryview_copy, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
30307 : {"copy_fortran", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_memoryview_copy_fortran, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
30308 : {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_memoryview_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
30309 : {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_memoryview_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
30310 : {0, 0, 0, 0}
30311 : };
30312 :
30313 : static struct PyGetSetDef __pyx_getsets_memoryview[] = {
30314 : {(char *)"T", __pyx_getprop___pyx_memoryview_T, 0, (char *)0, 0},
30315 : {(char *)"base", __pyx_getprop___pyx_memoryview_base, 0, (char *)0, 0},
30316 : {(char *)"shape", __pyx_getprop___pyx_memoryview_shape, 0, (char *)0, 0},
30317 : {(char *)"strides", __pyx_getprop___pyx_memoryview_strides, 0, (char *)0, 0},
30318 : {(char *)"suboffsets", __pyx_getprop___pyx_memoryview_suboffsets, 0, (char *)0, 0},
30319 : {(char *)"ndim", __pyx_getprop___pyx_memoryview_ndim, 0, (char *)0, 0},
30320 : {(char *)"itemsize", __pyx_getprop___pyx_memoryview_itemsize, 0, (char *)0, 0},
30321 : {(char *)"nbytes", __pyx_getprop___pyx_memoryview_nbytes, 0, (char *)0, 0},
30322 : {(char *)"size", __pyx_getprop___pyx_memoryview_size, 0, (char *)0, 0},
30323 : {0, 0, 0, 0, 0}
30324 : };
30325 : #if CYTHON_USE_TYPE_SPECS
30326 : #if !CYTHON_COMPILING_IN_LIMITED_API
30327 :
30328 : static PyBufferProcs __pyx_tp_as_buffer_memoryview = {
30329 : #if PY_MAJOR_VERSION < 3
30330 : 0, /*bf_getreadbuffer*/
30331 : #endif
30332 : #if PY_MAJOR_VERSION < 3
30333 : 0, /*bf_getwritebuffer*/
30334 : #endif
30335 : #if PY_MAJOR_VERSION < 3
30336 : 0, /*bf_getsegcount*/
30337 : #endif
30338 : #if PY_MAJOR_VERSION < 3
30339 : 0, /*bf_getcharbuffer*/
30340 : #endif
30341 : __pyx_memoryview_getbuffer, /*bf_getbuffer*/
30342 : 0, /*bf_releasebuffer*/
30343 : };
30344 : #endif
30345 : static PyType_Slot __pyx_type___pyx_memoryview_slots[] = {
30346 : {Py_tp_dealloc, (void *)__pyx_tp_dealloc_memoryview},
30347 : {Py_tp_repr, (void *)__pyx_memoryview___repr__},
30348 : {Py_sq_length, (void *)__pyx_memoryview___len__},
30349 : {Py_sq_item, (void *)__pyx_sq_item_memoryview},
30350 : {Py_mp_length, (void *)__pyx_memoryview___len__},
30351 : {Py_mp_subscript, (void *)__pyx_memoryview___getitem__},
30352 : {Py_mp_ass_subscript, (void *)__pyx_mp_ass_subscript_memoryview},
30353 : {Py_tp_str, (void *)__pyx_memoryview___str__},
30354 : #if defined(Py_bf_getbuffer)
30355 : {Py_bf_getbuffer, (void *)__pyx_memoryview_getbuffer},
30356 : #endif
30357 : {Py_tp_traverse, (void *)__pyx_tp_traverse_memoryview},
30358 : {Py_tp_clear, (void *)__pyx_tp_clear_memoryview},
30359 : {Py_tp_methods, (void *)__pyx_methods_memoryview},
30360 : {Py_tp_getset, (void *)__pyx_getsets_memoryview},
30361 : {Py_tp_new, (void *)__pyx_tp_new_memoryview},
30362 : {0, 0},
30363 : };
30364 : static PyType_Spec __pyx_type___pyx_memoryview_spec = {
30365 : "scipy.stats._sobol.memoryview",
30366 : sizeof(struct __pyx_memoryview_obj),
30367 : 0,
30368 : Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
30369 : __pyx_type___pyx_memoryview_slots,
30370 : };
30371 : #else
30372 :
30373 : static PySequenceMethods __pyx_tp_as_sequence_memoryview = {
30374 : __pyx_memoryview___len__, /*sq_length*/
30375 : 0, /*sq_concat*/
30376 : 0, /*sq_repeat*/
30377 : __pyx_sq_item_memoryview, /*sq_item*/
30378 : 0, /*sq_slice*/
30379 : 0, /*sq_ass_item*/
30380 : 0, /*sq_ass_slice*/
30381 : 0, /*sq_contains*/
30382 : 0, /*sq_inplace_concat*/
30383 : 0, /*sq_inplace_repeat*/
30384 : };
30385 :
30386 : static PyMappingMethods __pyx_tp_as_mapping_memoryview = {
30387 : __pyx_memoryview___len__, /*mp_length*/
30388 : __pyx_memoryview___getitem__, /*mp_subscript*/
30389 : __pyx_mp_ass_subscript_memoryview, /*mp_ass_subscript*/
30390 : };
30391 :
30392 : static PyBufferProcs __pyx_tp_as_buffer_memoryview = {
30393 : #if PY_MAJOR_VERSION < 3
30394 : 0, /*bf_getreadbuffer*/
30395 : #endif
30396 : #if PY_MAJOR_VERSION < 3
30397 : 0, /*bf_getwritebuffer*/
30398 : #endif
30399 : #if PY_MAJOR_VERSION < 3
30400 : 0, /*bf_getsegcount*/
30401 : #endif
30402 : #if PY_MAJOR_VERSION < 3
30403 : 0, /*bf_getcharbuffer*/
30404 : #endif
30405 : __pyx_memoryview_getbuffer, /*bf_getbuffer*/
30406 : 0, /*bf_releasebuffer*/
30407 : };
30408 :
30409 : static PyTypeObject __pyx_type___pyx_memoryview = {
30410 : PyVarObject_HEAD_INIT(0, 0)
30411 : "scipy.stats._sobol.""memoryview", /*tp_name*/
30412 : sizeof(struct __pyx_memoryview_obj), /*tp_basicsize*/
30413 : 0, /*tp_itemsize*/
30414 : __pyx_tp_dealloc_memoryview, /*tp_dealloc*/
30415 : #if PY_VERSION_HEX < 0x030800b4
30416 : 0, /*tp_print*/
30417 : #endif
30418 : #if PY_VERSION_HEX >= 0x030800b4
30419 : 0, /*tp_vectorcall_offset*/
30420 : #endif
30421 : 0, /*tp_getattr*/
30422 : 0, /*tp_setattr*/
30423 : #if PY_MAJOR_VERSION < 3
30424 : 0, /*tp_compare*/
30425 : #endif
30426 : #if PY_MAJOR_VERSION >= 3
30427 : 0, /*tp_as_async*/
30428 : #endif
30429 : __pyx_memoryview___repr__, /*tp_repr*/
30430 : 0, /*tp_as_number*/
30431 : &__pyx_tp_as_sequence_memoryview, /*tp_as_sequence*/
30432 : &__pyx_tp_as_mapping_memoryview, /*tp_as_mapping*/
30433 : 0, /*tp_hash*/
30434 : 0, /*tp_call*/
30435 : __pyx_memoryview___str__, /*tp_str*/
30436 : 0, /*tp_getattro*/
30437 : 0, /*tp_setattro*/
30438 : &__pyx_tp_as_buffer_memoryview, /*tp_as_buffer*/
30439 : Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
30440 : 0, /*tp_doc*/
30441 : __pyx_tp_traverse_memoryview, /*tp_traverse*/
30442 : __pyx_tp_clear_memoryview, /*tp_clear*/
30443 : 0, /*tp_richcompare*/
30444 : 0, /*tp_weaklistoffset*/
30445 : 0, /*tp_iter*/
30446 : 0, /*tp_iternext*/
30447 : __pyx_methods_memoryview, /*tp_methods*/
30448 : 0, /*tp_members*/
30449 : __pyx_getsets_memoryview, /*tp_getset*/
30450 : 0, /*tp_base*/
30451 : 0, /*tp_dict*/
30452 : 0, /*tp_descr_get*/
30453 : 0, /*tp_descr_set*/
30454 : #if !CYTHON_USE_TYPE_SPECS
30455 : 0, /*tp_dictoffset*/
30456 : #endif
30457 : 0, /*tp_init*/
30458 : 0, /*tp_alloc*/
30459 : __pyx_tp_new_memoryview, /*tp_new*/
30460 : 0, /*tp_free*/
30461 : 0, /*tp_is_gc*/
30462 : 0, /*tp_bases*/
30463 : 0, /*tp_mro*/
30464 : 0, /*tp_cache*/
30465 : 0, /*tp_subclasses*/
30466 : 0, /*tp_weaklist*/
30467 : 0, /*tp_del*/
30468 : 0, /*tp_version_tag*/
30469 : #if PY_VERSION_HEX >= 0x030400a1
30470 : #if CYTHON_USE_TP_FINALIZE
30471 : 0, /*tp_finalize*/
30472 : #else
30473 : NULL, /*tp_finalize*/
30474 : #endif
30475 : #endif
30476 : #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
30477 : 0, /*tp_vectorcall*/
30478 : #endif
30479 : #if __PYX_NEED_TP_PRINT_SLOT == 1
30480 : 0, /*tp_print*/
30481 : #endif
30482 : #if PY_VERSION_HEX >= 0x030C0000
30483 : 0, /*tp_watched*/
30484 : #endif
30485 : #if PY_VERSION_HEX >= 0x030d00A4
30486 : 0, /*tp_versions_used*/
30487 : #endif
30488 : #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
30489 : 0, /*tp_pypy_flags*/
30490 : #endif
30491 : };
30492 : #endif
30493 : static struct __pyx_vtabstruct__memoryviewslice __pyx_vtable__memoryviewslice;
30494 :
30495 0 : static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k) {
30496 0 : struct __pyx_memoryviewslice_obj *p;
30497 0 : PyObject *o = __pyx_tp_new_memoryview(t, a, k);
30498 0 : if (unlikely(!o)) return 0;
30499 0 : p = ((struct __pyx_memoryviewslice_obj *)o);
30500 0 : p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_memoryview*)__pyx_vtabptr__memoryviewslice;
30501 0 : p->from_object = Py_None; Py_INCREF(Py_None);
30502 0 : p->from_slice.memview = NULL;
30503 0 : return o;
30504 : }
30505 :
30506 0 : static void __pyx_tp_dealloc__memoryviewslice(PyObject *o) {
30507 0 : struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
30508 : #if CYTHON_USE_TP_FINALIZE
30509 0 : if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
30510 0 : if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc__memoryviewslice) {
30511 0 : if (PyObject_CallFinalizerFromDealloc(o)) return;
30512 : }
30513 : }
30514 : #endif
30515 0 : PyObject_GC_UnTrack(o);
30516 : {
30517 0 : PyObject *etype, *eval, *etb;
30518 0 : PyErr_Fetch(&etype, &eval, &etb);
30519 0 : __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
30520 0 : __pyx_memoryviewslice___dealloc__(o);
30521 0 : __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
30522 0 : PyErr_Restore(etype, eval, etb);
30523 : }
30524 0 : Py_CLEAR(p->from_object);
30525 0 : PyObject_GC_Track(o);
30526 0 : __pyx_tp_dealloc_memoryview(o);
30527 : }
30528 :
30529 0 : static int __pyx_tp_traverse__memoryviewslice(PyObject *o, visitproc v, void *a) {
30530 0 : int e;
30531 0 : struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
30532 0 : e = __pyx_tp_traverse_memoryview(o, v, a); if (e) return e;
30533 0 : if (p->from_object) {
30534 0 : e = (*v)(p->from_object, a); if (e) return e;
30535 : }
30536 : return 0;
30537 : }
30538 :
30539 0 : static int __pyx_tp_clear__memoryviewslice(PyObject *o) {
30540 0 : PyObject* tmp;
30541 0 : struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
30542 0 : __pyx_tp_clear_memoryview(o);
30543 0 : tmp = ((PyObject*)p->from_object);
30544 0 : p->from_object = Py_None; Py_INCREF(Py_None);
30545 0 : Py_XDECREF(tmp);
30546 0 : __PYX_XCLEAR_MEMVIEW(&p->from_slice, 1);
30547 0 : return 0;
30548 : }
30549 :
30550 : static PyMethodDef __pyx_methods__memoryviewslice[] = {
30551 : {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_memoryviewslice_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
30552 : {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_memoryviewslice_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
30553 : {0, 0, 0, 0}
30554 : };
30555 : #if CYTHON_USE_TYPE_SPECS
30556 : static PyType_Slot __pyx_type___pyx_memoryviewslice_slots[] = {
30557 : {Py_tp_dealloc, (void *)__pyx_tp_dealloc__memoryviewslice},
30558 : {Py_tp_doc, (void *)PyDoc_STR("Internal class for passing memoryview slices to Python")},
30559 : {Py_tp_traverse, (void *)__pyx_tp_traverse__memoryviewslice},
30560 : {Py_tp_clear, (void *)__pyx_tp_clear__memoryviewslice},
30561 : {Py_tp_methods, (void *)__pyx_methods__memoryviewslice},
30562 : {Py_tp_new, (void *)__pyx_tp_new__memoryviewslice},
30563 : {0, 0},
30564 : };
30565 : static PyType_Spec __pyx_type___pyx_memoryviewslice_spec = {
30566 : "scipy.stats._sobol._memoryviewslice",
30567 : sizeof(struct __pyx_memoryviewslice_obj),
30568 : 0,
30569 : Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_SEQUENCE,
30570 : __pyx_type___pyx_memoryviewslice_slots,
30571 : };
30572 : #else
30573 :
30574 : static PyTypeObject __pyx_type___pyx_memoryviewslice = {
30575 : PyVarObject_HEAD_INIT(0, 0)
30576 : "scipy.stats._sobol.""_memoryviewslice", /*tp_name*/
30577 : sizeof(struct __pyx_memoryviewslice_obj), /*tp_basicsize*/
30578 : 0, /*tp_itemsize*/
30579 : __pyx_tp_dealloc__memoryviewslice, /*tp_dealloc*/
30580 : #if PY_VERSION_HEX < 0x030800b4
30581 : 0, /*tp_print*/
30582 : #endif
30583 : #if PY_VERSION_HEX >= 0x030800b4
30584 : 0, /*tp_vectorcall_offset*/
30585 : #endif
30586 : 0, /*tp_getattr*/
30587 : 0, /*tp_setattr*/
30588 : #if PY_MAJOR_VERSION < 3
30589 : 0, /*tp_compare*/
30590 : #endif
30591 : #if PY_MAJOR_VERSION >= 3
30592 : 0, /*tp_as_async*/
30593 : #endif
30594 : #if CYTHON_COMPILING_IN_PYPY || 0
30595 : __pyx_memoryview___repr__, /*tp_repr*/
30596 : #else
30597 : 0, /*tp_repr*/
30598 : #endif
30599 : 0, /*tp_as_number*/
30600 : 0, /*tp_as_sequence*/
30601 : 0, /*tp_as_mapping*/
30602 : 0, /*tp_hash*/
30603 : 0, /*tp_call*/
30604 : #if CYTHON_COMPILING_IN_PYPY || 0
30605 : __pyx_memoryview___str__, /*tp_str*/
30606 : #else
30607 : 0, /*tp_str*/
30608 : #endif
30609 : 0, /*tp_getattro*/
30610 : 0, /*tp_setattro*/
30611 : 0, /*tp_as_buffer*/
30612 : Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_SEQUENCE, /*tp_flags*/
30613 : PyDoc_STR("Internal class for passing memoryview slices to Python"), /*tp_doc*/
30614 : __pyx_tp_traverse__memoryviewslice, /*tp_traverse*/
30615 : __pyx_tp_clear__memoryviewslice, /*tp_clear*/
30616 : 0, /*tp_richcompare*/
30617 : 0, /*tp_weaklistoffset*/
30618 : 0, /*tp_iter*/
30619 : 0, /*tp_iternext*/
30620 : __pyx_methods__memoryviewslice, /*tp_methods*/
30621 : 0, /*tp_members*/
30622 : 0, /*tp_getset*/
30623 : 0, /*tp_base*/
30624 : 0, /*tp_dict*/
30625 : 0, /*tp_descr_get*/
30626 : 0, /*tp_descr_set*/
30627 : #if !CYTHON_USE_TYPE_SPECS
30628 : 0, /*tp_dictoffset*/
30629 : #endif
30630 : 0, /*tp_init*/
30631 : 0, /*tp_alloc*/
30632 : __pyx_tp_new__memoryviewslice, /*tp_new*/
30633 : 0, /*tp_free*/
30634 : 0, /*tp_is_gc*/
30635 : 0, /*tp_bases*/
30636 : 0, /*tp_mro*/
30637 : 0, /*tp_cache*/
30638 : 0, /*tp_subclasses*/
30639 : 0, /*tp_weaklist*/
30640 : 0, /*tp_del*/
30641 : 0, /*tp_version_tag*/
30642 : #if PY_VERSION_HEX >= 0x030400a1
30643 : #if CYTHON_USE_TP_FINALIZE
30644 : 0, /*tp_finalize*/
30645 : #else
30646 : NULL, /*tp_finalize*/
30647 : #endif
30648 : #endif
30649 : #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
30650 : 0, /*tp_vectorcall*/
30651 : #endif
30652 : #if __PYX_NEED_TP_PRINT_SLOT == 1
30653 : 0, /*tp_print*/
30654 : #endif
30655 : #if PY_VERSION_HEX >= 0x030C0000
30656 : 0, /*tp_watched*/
30657 : #endif
30658 : #if PY_VERSION_HEX >= 0x030d00A4
30659 : 0, /*tp_versions_used*/
30660 : #endif
30661 : #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
30662 : 0, /*tp_pypy_flags*/
30663 : #endif
30664 : };
30665 : #endif
30666 :
30667 : static PyMethodDef __pyx_methods[] = {
30668 : {0, 0, 0, 0}
30669 : };
30670 : #ifndef CYTHON_SMALL_CODE
30671 : #if defined(__clang__)
30672 : #define CYTHON_SMALL_CODE
30673 : #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
30674 : #define CYTHON_SMALL_CODE __attribute__((cold))
30675 : #else
30676 : #define CYTHON_SMALL_CODE
30677 : #endif
30678 : #endif
30679 : /* #### Code section: pystring_table ### */
30680 :
30681 3 : static int __Pyx_CreateStringTabAndInitStrings(void) {
30682 3 : __Pyx_StringTabEntry __pyx_string_tab[] = {
30683 3 : {&__pyx_kp_u_, __pyx_k_, sizeof(__pyx_k_), 0, 1, 0, 0},
30684 3 : {&__pyx_n_s_ASCII, __pyx_k_ASCII, sizeof(__pyx_k_ASCII), 0, 0, 1, 1},
30685 3 : {&__pyx_kp_s_All_dimensions_preceding_dimensi, __pyx_k_All_dimensions_preceding_dimensi, sizeof(__pyx_k_All_dimensions_preceding_dimensi), 0, 0, 1, 0},
30686 3 : {&__pyx_n_s_AssertionError, __pyx_k_AssertionError, sizeof(__pyx_k_AssertionError), 0, 0, 1, 1},
30687 3 : {&__pyx_kp_s_Buffer_view_does_not_expose_stri, __pyx_k_Buffer_view_does_not_expose_stri, sizeof(__pyx_k_Buffer_view_does_not_expose_stri), 0, 0, 1, 0},
30688 3 : {&__pyx_kp_s_Can_only_create_a_buffer_that_is, __pyx_k_Can_only_create_a_buffer_that_is, sizeof(__pyx_k_Can_only_create_a_buffer_that_is), 0, 0, 1, 0},
30689 3 : {&__pyx_kp_s_Cannot_assign_to_read_only_memor, __pyx_k_Cannot_assign_to_read_only_memor, sizeof(__pyx_k_Cannot_assign_to_read_only_memor), 0, 0, 1, 0},
30690 3 : {&__pyx_kp_s_Cannot_create_writable_memory_vi, __pyx_k_Cannot_create_writable_memory_vi, sizeof(__pyx_k_Cannot_create_writable_memory_vi), 0, 0, 1, 0},
30691 3 : {&__pyx_kp_u_Cannot_index_with_type, __pyx_k_Cannot_index_with_type, sizeof(__pyx_k_Cannot_index_with_type), 0, 1, 0, 0},
30692 3 : {&__pyx_kp_s_Cannot_transpose_memoryview_with, __pyx_k_Cannot_transpose_memoryview_with, sizeof(__pyx_k_Cannot_transpose_memoryview_with), 0, 0, 1, 0},
30693 3 : {&__pyx_kp_s_Dimension_d_is_not_direct, __pyx_k_Dimension_d_is_not_direct, sizeof(__pyx_k_Dimension_d_is_not_direct), 0, 0, 1, 0},
30694 3 : {&__pyx_n_s_Ellipsis, __pyx_k_Ellipsis, sizeof(__pyx_k_Ellipsis), 0, 0, 1, 1},
30695 3 : {&__pyx_kp_s_Empty_shape_tuple_for_cython_arr, __pyx_k_Empty_shape_tuple_for_cython_arr, sizeof(__pyx_k_Empty_shape_tuple_for_cython_arr), 0, 0, 1, 0},
30696 3 : {&__pyx_kp_s_Expected_at_least_d_argument_s_g, __pyx_k_Expected_at_least_d_argument_s_g, sizeof(__pyx_k_Expected_at_least_d_argument_s_g), 0, 0, 1, 0},
30697 3 : {&__pyx_kp_s_Function_call_with_ambiguous_arg, __pyx_k_Function_call_with_ambiguous_arg, sizeof(__pyx_k_Function_call_with_ambiguous_arg), 0, 0, 1, 0},
30698 3 : {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
30699 3 : {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_k_Incompatible_checksums_0x_x_vs_0, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0), 0, 0, 1, 0},
30700 3 : {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
30701 3 : {&__pyx_kp_s_Index_out_of_bounds_axis_d, __pyx_k_Index_out_of_bounds_axis_d, sizeof(__pyx_k_Index_out_of_bounds_axis_d), 0, 0, 1, 0},
30702 3 : {&__pyx_kp_s_Indirect_dimensions_not_supporte, __pyx_k_Indirect_dimensions_not_supporte, sizeof(__pyx_k_Indirect_dimensions_not_supporte), 0, 0, 1, 0},
30703 3 : {&__pyx_kp_u_Invalid_mode_expected_c_or_fortr, __pyx_k_Invalid_mode_expected_c_or_fortr, sizeof(__pyx_k_Invalid_mode_expected_c_or_fortr), 0, 1, 0, 0},
30704 3 : {&__pyx_kp_u_Invalid_shape_in_axis, __pyx_k_Invalid_shape_in_axis, sizeof(__pyx_k_Invalid_shape_in_axis), 0, 1, 0, 0},
30705 3 : {&__pyx_n_s_MAXDEG, __pyx_k_MAXDEG, sizeof(__pyx_k_MAXDEG), 0, 0, 1, 1},
30706 3 : {&__pyx_n_s_MAXDIM, __pyx_k_MAXDIM, sizeof(__pyx_k_MAXDIM), 0, 0, 1, 1},
30707 3 : {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1},
30708 3 : {&__pyx_kp_s_MemoryView_of_r_at_0x_x, __pyx_k_MemoryView_of_r_at_0x_x, sizeof(__pyx_k_MemoryView_of_r_at_0x_x), 0, 0, 1, 0},
30709 3 : {&__pyx_kp_s_MemoryView_of_r_object, __pyx_k_MemoryView_of_r_object, sizeof(__pyx_k_MemoryView_of_r_object), 0, 0, 1, 0},
30710 3 : {&__pyx_kp_s_No_matching_signature_found, __pyx_k_No_matching_signature_found, sizeof(__pyx_k_No_matching_signature_found), 0, 0, 1, 0},
30711 3 : {&__pyx_n_b_O, __pyx_k_O, sizeof(__pyx_k_O), 0, 0, 0, 1},
30712 3 : {&__pyx_kp_u_Out_of_bounds_on_buffer_access_a, __pyx_k_Out_of_bounds_on_buffer_access_a, sizeof(__pyx_k_Out_of_bounds_on_buffer_access_a), 0, 1, 0, 0},
30713 3 : {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
30714 3 : {&__pyx_n_s_Sequence, __pyx_k_Sequence, sizeof(__pyx_k_Sequence), 0, 0, 1, 1},
30715 3 : {&__pyx_kp_s_Step_may_not_be_zero_axis_d, __pyx_k_Step_may_not_be_zero_axis_d, sizeof(__pyx_k_Step_may_not_be_zero_axis_d), 0, 0, 1, 0},
30716 3 : {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
30717 3 : {&__pyx_kp_s_Unable_to_convert_item_to_object, __pyx_k_Unable_to_convert_item_to_object, sizeof(__pyx_k_Unable_to_convert_item_to_object), 0, 0, 1, 0},
30718 3 : {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
30719 3 : {&__pyx_n_s_View_MemoryView, __pyx_k_View_MemoryView, sizeof(__pyx_k_View_MemoryView), 0, 0, 1, 1},
30720 3 : {&__pyx_kp_s__16, __pyx_k__16, sizeof(__pyx_k__16), 0, 0, 1, 0},
30721 3 : {&__pyx_kp_s__17, __pyx_k__17, sizeof(__pyx_k__17), 0, 0, 1, 0},
30722 3 : {&__pyx_kp_u__17, __pyx_k__17, sizeof(__pyx_k__17), 0, 1, 0, 0},
30723 3 : {&__pyx_kp_u__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 1, 0, 0},
30724 3 : {&__pyx_n_s__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 0, 1, 1},
30725 3 : {&__pyx_n_s__56, __pyx_k__56, sizeof(__pyx_k__56), 0, 0, 1, 1},
30726 3 : {&__pyx_kp_u__6, __pyx_k__6, sizeof(__pyx_k__6), 0, 1, 0, 0},
30727 3 : {&__pyx_kp_u__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 1, 0, 0},
30728 3 : {&__pyx_n_s_abc, __pyx_k_abc, sizeof(__pyx_k_abc), 0, 0, 1, 1},
30729 3 : {&__pyx_n_s_allocate_buffer, __pyx_k_allocate_buffer, sizeof(__pyx_k_allocate_buffer), 0, 0, 1, 1},
30730 3 : {&__pyx_kp_u_and, __pyx_k_and, sizeof(__pyx_k_and), 0, 1, 0, 0},
30731 3 : {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
30732 3 : {&__pyx_n_s_as_file, __pyx_k_as_file, sizeof(__pyx_k_as_file), 0, 0, 1, 1},
30733 3 : {&__pyx_n_s_astype, __pyx_k_astype, sizeof(__pyx_k_astype), 0, 0, 1, 1},
30734 3 : {&__pyx_n_s_asyncio_coroutines, __pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 0, 1, 1},
30735 3 : {&__pyx_n_s_base, __pyx_k_base, sizeof(__pyx_k_base), 0, 0, 1, 1},
30736 3 : {&__pyx_n_s_bits, __pyx_k_bits, sizeof(__pyx_k_bits), 0, 0, 1, 1},
30737 3 : {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1},
30738 3 : {&__pyx_n_u_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 1, 0, 1},
30739 3 : {&__pyx_n_s_categorize, __pyx_k_categorize, sizeof(__pyx_k_categorize), 0, 0, 1, 1},
30740 3 : {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1},
30741 3 : {&__pyx_n_s_class_getitem, __pyx_k_class_getitem, sizeof(__pyx_k_class_getitem), 0, 0, 1, 1},
30742 3 : {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
30743 3 : {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1},
30744 3 : {&__pyx_kp_s_collections_abc, __pyx_k_collections_abc, sizeof(__pyx_k_collections_abc), 0, 0, 1, 0},
30745 3 : {&__pyx_kp_s_contiguous_and_direct, __pyx_k_contiguous_and_direct, sizeof(__pyx_k_contiguous_and_direct), 0, 0, 1, 0},
30746 3 : {&__pyx_kp_s_contiguous_and_indirect, __pyx_k_contiguous_and_indirect, sizeof(__pyx_k_contiguous_and_indirect), 0, 0, 1, 0},
30747 3 : {&__pyx_n_s_count, __pyx_k_count, sizeof(__pyx_k_count), 0, 0, 1, 1},
30748 3 : {&__pyx_n_s_cscramble, __pyx_k_cscramble, sizeof(__pyx_k_cscramble), 0, 0, 1, 1},
30749 3 : {&__pyx_n_s_curdir, __pyx_k_curdir, sizeof(__pyx_k_curdir), 0, 0, 1, 1},
30750 3 : {&__pyx_n_s_defaults, __pyx_k_defaults, sizeof(__pyx_k_defaults), 0, 0, 1, 1},
30751 3 : {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
30752 3 : {&__pyx_n_s_dim, __pyx_k_dim, sizeof(__pyx_k_dim), 0, 0, 1, 1},
30753 3 : {&__pyx_kp_u_disable, __pyx_k_disable, sizeof(__pyx_k_disable), 0, 1, 0, 0},
30754 3 : {&__pyx_n_s_dns, __pyx_k_dns, sizeof(__pyx_k_dns), 0, 0, 1, 1},
30755 3 : {&__pyx_n_s_dns_poly, __pyx_k_dns_poly, sizeof(__pyx_k_dns_poly), 0, 0, 1, 1},
30756 3 : {&__pyx_n_s_dns_vinit, __pyx_k_dns_vinit, sizeof(__pyx_k_dns_vinit), 0, 0, 1, 1},
30757 3 : {&__pyx_n_s_draw, __pyx_k_draw, sizeof(__pyx_k_draw), 0, 0, 1, 1},
30758 3 : {&__pyx_n_s_draws, __pyx_k_draws, sizeof(__pyx_k_draws), 0, 0, 1, 1},
30759 3 : {&__pyx_n_s_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 0, 1, 1},
30760 3 : {&__pyx_n_s_dtype_is_object, __pyx_k_dtype_is_object, sizeof(__pyx_k_dtype_is_object), 0, 0, 1, 1},
30761 3 : {&__pyx_n_s_empty, __pyx_k_empty, sizeof(__pyx_k_empty), 0, 0, 1, 1},
30762 3 : {&__pyx_kp_u_enable, __pyx_k_enable, sizeof(__pyx_k_enable), 0, 1, 0, 0},
30763 3 : {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
30764 3 : {&__pyx_n_s_enter, __pyx_k_enter, sizeof(__pyx_k_enter), 0, 0, 1, 1},
30765 3 : {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
30766 3 : {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1},
30767 3 : {&__pyx_n_s_exit, __pyx_k_exit, sizeof(__pyx_k_exit), 0, 0, 1, 1},
30768 3 : {&__pyx_n_s_f, __pyx_k_f, sizeof(__pyx_k_f), 0, 0, 1, 1},
30769 3 : {&__pyx_n_s_fast_forward, __pyx_k_fast_forward, sizeof(__pyx_k_fast_forward), 0, 0, 1, 1},
30770 3 : {&__pyx_n_s_files, __pyx_k_files, sizeof(__pyx_k_files), 0, 0, 1, 1},
30771 3 : {&__pyx_n_s_fill_p_cumulative, __pyx_k_fill_p_cumulative, sizeof(__pyx_k_fill_p_cumulative), 0, 0, 1, 1},
30772 3 : {&__pyx_n_s_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 0, 0, 1, 1},
30773 3 : {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
30774 3 : {&__pyx_n_s_fortran, __pyx_k_fortran, sizeof(__pyx_k_fortran), 0, 0, 1, 1},
30775 3 : {&__pyx_n_u_fortran, __pyx_k_fortran, sizeof(__pyx_k_fortran), 0, 1, 0, 1},
30776 3 : {&__pyx_n_s_fused_sigindex, __pyx_k_fused_sigindex, sizeof(__pyx_k_fused_sigindex), 0, 0, 1, 1},
30777 3 : {&__pyx_kp_u_gc, __pyx_k_gc, sizeof(__pyx_k_gc), 0, 1, 0, 0},
30778 3 : {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1},
30779 3 : {&__pyx_n_s_get_poly_vinit, __pyx_k_get_poly_vinit, sizeof(__pyx_k_get_poly_vinit), 0, 0, 1, 1},
30780 3 : {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
30781 3 : {&__pyx_kp_u_got, __pyx_k_got, sizeof(__pyx_k_got), 0, 1, 0, 0},
30782 3 : {&__pyx_kp_u_got_differing_extents_in_dimensi, __pyx_k_got_differing_extents_in_dimensi, sizeof(__pyx_k_got_differing_extents_in_dimensi), 0, 1, 0, 0},
30783 3 : {&__pyx_kp_s_home_czgdp18079_Quansight_scipy, __pyx_k_home_czgdp18079_Quansight_scipy, sizeof(__pyx_k_home_czgdp18079_Quansight_scipy), 0, 0, 1, 0},
30784 3 : {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1},
30785 3 : {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
30786 3 : {&__pyx_n_s_importlib, __pyx_k_importlib, sizeof(__pyx_k_importlib), 0, 0, 1, 1},
30787 3 : {&__pyx_n_s_importlib_resources, __pyx_k_importlib_resources, sizeof(__pyx_k_importlib_resources), 0, 0, 1, 1},
30788 3 : {&__pyx_n_s_index, __pyx_k_index, sizeof(__pyx_k_index), 0, 0, 1, 1},
30789 3 : {&__pyx_n_s_initialize_direction_numbers, __pyx_k_initialize_direction_numbers, sizeof(__pyx_k_initialize_direction_numbers), 0, 0, 1, 1},
30790 3 : {&__pyx_n_s_initialize_v, __pyx_k_initialize_v, sizeof(__pyx_k_initialize_v), 0, 0, 1, 1},
30791 3 : {&__pyx_n_s_initializing, __pyx_k_initializing, sizeof(__pyx_k_initializing), 0, 0, 1, 1},
30792 3 : {&__pyx_n_s_is_coroutine, __pyx_k_is_coroutine, sizeof(__pyx_k_is_coroutine), 0, 0, 1, 1},
30793 3 : {&__pyx_kp_u_isenabled, __pyx_k_isenabled, sizeof(__pyx_k_isenabled), 0, 1, 0, 0},
30794 3 : {&__pyx_n_s_itemsize, __pyx_k_itemsize, sizeof(__pyx_k_itemsize), 0, 0, 1, 1},
30795 3 : {&__pyx_kp_s_itemsize_0_for_cython_array, __pyx_k_itemsize_0_for_cython_array, sizeof(__pyx_k_itemsize_0_for_cython_array), 0, 0, 1, 0},
30796 3 : {&__pyx_n_s_joinpath, __pyx_k_joinpath, sizeof(__pyx_k_joinpath), 0, 0, 1, 1},
30797 3 : {&__pyx_n_s_kind, __pyx_k_kind, sizeof(__pyx_k_kind), 0, 0, 1, 1},
30798 3 : {&__pyx_n_s_kwargs, __pyx_k_kwargs, sizeof(__pyx_k_kwargs), 0, 0, 1, 1},
30799 3 : {&__pyx_n_s_load, __pyx_k_load, sizeof(__pyx_k_load), 0, 0, 1, 1},
30800 3 : {&__pyx_n_s_ltm, __pyx_k_ltm, sizeof(__pyx_k_ltm), 0, 0, 1, 1},
30801 3 : {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
30802 3 : {&__pyx_n_s_memview, __pyx_k_memview, sizeof(__pyx_k_memview), 0, 0, 1, 1},
30803 3 : {&__pyx_n_s_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 0, 0, 1, 1},
30804 3 : {&__pyx_n_s_n, __pyx_k_n, sizeof(__pyx_k_n), 0, 0, 1, 1},
30805 3 : {&__pyx_n_s_n_2, __pyx_k_n_2, sizeof(__pyx_k_n_2), 0, 0, 1, 1},
30806 3 : {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
30807 3 : {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
30808 3 : {&__pyx_n_s_ndim, __pyx_k_ndim, sizeof(__pyx_k_ndim), 0, 0, 1, 1},
30809 3 : {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
30810 3 : {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0},
30811 3 : {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1},
30812 3 : {&__pyx_n_s_npzfile, __pyx_k_npzfile, sizeof(__pyx_k_npzfile), 0, 0, 1, 1},
30813 3 : {&__pyx_n_s_num_gen, __pyx_k_num_gen, sizeof(__pyx_k_num_gen), 0, 0, 1, 1},
30814 3 : {&__pyx_n_s_num_gen_2, __pyx_k_num_gen_2, sizeof(__pyx_k_num_gen_2), 0, 0, 1, 1},
30815 3 : {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1},
30816 3 : {&__pyx_kp_u_numpy__core_multiarray_failed_to, __pyx_k_numpy__core_multiarray_failed_to, sizeof(__pyx_k_numpy__core_multiarray_failed_to), 0, 1, 0, 0},
30817 3 : {&__pyx_kp_u_numpy__core_umath_failed_to_impo, __pyx_k_numpy__core_umath_failed_to_impo, sizeof(__pyx_k_numpy__core_umath_failed_to_impo), 0, 1, 0, 0},
30818 3 : {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
30819 3 : {&__pyx_n_s_p, __pyx_k_p, sizeof(__pyx_k_p), 0, 0, 1, 1},
30820 3 : {&__pyx_n_s_p_cumulative, __pyx_k_p_cumulative, sizeof(__pyx_k_p_cumulative), 0, 0, 1, 1},
30821 3 : {&__pyx_n_s_pack, __pyx_k_pack, sizeof(__pyx_k_pack), 0, 0, 1, 1},
30822 3 : {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
30823 3 : {&__pyx_n_s_poly, __pyx_k_poly, sizeof(__pyx_k_poly), 0, 0, 1, 1},
30824 3 : {&__pyx_n_u_poly, __pyx_k_poly, sizeof(__pyx_k_poly), 0, 1, 0, 1},
30825 3 : {&__pyx_n_s_poly_dict, __pyx_k_poly_dict, sizeof(__pyx_k_poly_dict), 0, 0, 1, 1},
30826 3 : {&__pyx_n_s_poly_vinit, __pyx_k_poly_vinit, sizeof(__pyx_k_poly_vinit), 0, 0, 1, 1},
30827 3 : {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},
30828 3 : {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
30829 3 : {&__pyx_n_s_pyx_fuse_0_cscramble, __pyx_k_pyx_fuse_0_cscramble, sizeof(__pyx_k_pyx_fuse_0_cscramble), 0, 0, 1, 1},
30830 3 : {&__pyx_n_s_pyx_fuse_0_fast_forward, __pyx_k_pyx_fuse_0_fast_forward, sizeof(__pyx_k_pyx_fuse_0_fast_forward), 0, 0, 1, 1},
30831 3 : {&__pyx_n_s_pyx_fuse_0_initialize_v, __pyx_k_pyx_fuse_0_initialize_v, sizeof(__pyx_k_pyx_fuse_0_initialize_v), 0, 0, 1, 1},
30832 3 : {&__pyx_n_s_pyx_fuse_1_cscramble, __pyx_k_pyx_fuse_1_cscramble, sizeof(__pyx_k_pyx_fuse_1_cscramble), 0, 0, 1, 1},
30833 3 : {&__pyx_n_s_pyx_fuse_1_fast_forward, __pyx_k_pyx_fuse_1_fast_forward, sizeof(__pyx_k_pyx_fuse_1_fast_forward), 0, 0, 1, 1},
30834 3 : {&__pyx_n_s_pyx_fuse_1_initialize_v, __pyx_k_pyx_fuse_1_initialize_v, sizeof(__pyx_k_pyx_fuse_1_initialize_v), 0, 0, 1, 1},
30835 3 : {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
30836 3 : {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
30837 3 : {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
30838 3 : {&__pyx_n_s_pyx_unpickle_Enum, __pyx_k_pyx_unpickle_Enum, sizeof(__pyx_k_pyx_unpickle_Enum), 0, 0, 1, 1},
30839 3 : {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
30840 3 : {&__pyx_n_s_quasi, __pyx_k_quasi, sizeof(__pyx_k_quasi), 0, 0, 1, 1},
30841 3 : {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
30842 3 : {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
30843 3 : {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
30844 3 : {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
30845 3 : {&__pyx_n_s_register, __pyx_k_register, sizeof(__pyx_k_register), 0, 0, 1, 1},
30846 3 : {&__pyx_n_s_resources, __pyx_k_resources, sizeof(__pyx_k_resources), 0, 0, 1, 1},
30847 3 : {&__pyx_n_s_result, __pyx_k_result, sizeof(__pyx_k_result), 0, 0, 1, 1},
30848 3 : {&__pyx_n_s_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 1, 1},
30849 3 : {&__pyx_n_s_sample, __pyx_k_sample, sizeof(__pyx_k_sample), 0, 0, 1, 1},
30850 3 : {&__pyx_n_s_scale, __pyx_k_scale, sizeof(__pyx_k_scale), 0, 0, 1, 1},
30851 3 : {&__pyx_kp_u_scipy_stats, __pyx_k_scipy_stats, sizeof(__pyx_k_scipy_stats), 0, 1, 0, 0},
30852 3 : {&__pyx_n_s_scipy_stats__sobol, __pyx_k_scipy_stats__sobol, sizeof(__pyx_k_scipy_stats__sobol), 0, 0, 1, 1},
30853 3 : {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
30854 3 : {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
30855 3 : {&__pyx_n_s_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 0, 0, 1, 1},
30856 3 : {&__pyx_n_s_signatures, __pyx_k_signatures, sizeof(__pyx_k_signatures), 0, 0, 1, 1},
30857 3 : {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1},
30858 3 : {&__pyx_kp_u_sobol_direction_numbers_npz, __pyx_k_sobol_direction_numbers_npz, sizeof(__pyx_k_sobol_direction_numbers_npz), 0, 1, 0, 0},
30859 3 : {&__pyx_n_s_spec, __pyx_k_spec, sizeof(__pyx_k_spec), 0, 0, 1, 1},
30860 3 : {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1},
30861 3 : {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
30862 3 : {&__pyx_n_s_step, __pyx_k_step, sizeof(__pyx_k_step), 0, 0, 1, 1},
30863 3 : {&__pyx_n_s_stop, __pyx_k_stop, sizeof(__pyx_k_stop), 0, 0, 1, 1},
30864 3 : {&__pyx_kp_s_strided_and_direct, __pyx_k_strided_and_direct, sizeof(__pyx_k_strided_and_direct), 0, 0, 1, 0},
30865 3 : {&__pyx_kp_s_strided_and_direct_or_indirect, __pyx_k_strided_and_direct_or_indirect, sizeof(__pyx_k_strided_and_direct_or_indirect), 0, 0, 1, 0},
30866 3 : {&__pyx_kp_s_strided_and_indirect, __pyx_k_strided_and_indirect, sizeof(__pyx_k_strided_and_indirect), 0, 0, 1, 0},
30867 3 : {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
30868 3 : {&__pyx_n_s_strip, __pyx_k_strip, sizeof(__pyx_k_strip), 0, 0, 1, 1},
30869 3 : {&__pyx_n_s_struct, __pyx_k_struct, sizeof(__pyx_k_struct), 0, 0, 1, 1},
30870 3 : {&__pyx_n_s_sv, __pyx_k_sv, sizeof(__pyx_k_sv), 0, 0, 1, 1},
30871 3 : {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
30872 3 : {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
30873 3 : {&__pyx_n_s_test_find_index, __pyx_k_test_find_index, sizeof(__pyx_k_test_find_index), 0, 0, 1, 1},
30874 3 : {&__pyx_n_s_uint32, __pyx_k_uint32, sizeof(__pyx_k_uint32), 0, 0, 1, 1},
30875 3 : {&__pyx_n_s_uint32_t, __pyx_k_uint32_t, sizeof(__pyx_k_uint32_t), 0, 0, 1, 1},
30876 3 : {&__pyx_n_s_uint64, __pyx_k_uint64, sizeof(__pyx_k_uint64), 0, 0, 1, 1},
30877 3 : {&__pyx_n_s_uint64_t, __pyx_k_uint64_t, sizeof(__pyx_k_uint64_t), 0, 0, 1, 1},
30878 3 : {&__pyx_kp_s_unable_to_allocate_array_data, __pyx_k_unable_to_allocate_array_data, sizeof(__pyx_k_unable_to_allocate_array_data), 0, 0, 1, 0},
30879 3 : {&__pyx_kp_s_unable_to_allocate_shape_and_str, __pyx_k_unable_to_allocate_shape_and_str, sizeof(__pyx_k_unable_to_allocate_shape_and_str), 0, 0, 1, 0},
30880 3 : {&__pyx_n_s_unpack, __pyx_k_unpack, sizeof(__pyx_k_unpack), 0, 0, 1, 1},
30881 3 : {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
30882 3 : {&__pyx_n_s_v, __pyx_k_v, sizeof(__pyx_k_v), 0, 0, 1, 1},
30883 3 : {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
30884 3 : {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1},
30885 3 : {&__pyx_n_s_version_info, __pyx_k_version_info, sizeof(__pyx_k_version_info), 0, 0, 1, 1},
30886 3 : {&__pyx_n_s_vinit, __pyx_k_vinit, sizeof(__pyx_k_vinit), 0, 0, 1, 1},
30887 3 : {&__pyx_n_u_vinit, __pyx_k_vinit, sizeof(__pyx_k_vinit), 0, 1, 0, 1},
30888 3 : {&__pyx_n_s_vinit_dict, __pyx_k_vinit_dict, sizeof(__pyx_k_vinit_dict), 0, 0, 1, 1},
30889 : {0, 0, 0, 0, 0, 0, 0}
30890 : };
30891 3 : return __Pyx_InitStrings(__pyx_string_tab);
30892 : }
30893 : /* #### Code section: cached_builtins ### */
30894 3 : static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
30895 3 : __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 244, __pyx_L1_error)
30896 3 : __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 244, __pyx_L1_error)
30897 3 : __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 263, __pyx_L1_error)
30898 3 : __pyx_builtin___import__ = __Pyx_GetBuiltinName(__pyx_n_s_import); if (!__pyx_builtin___import__) __PYX_ERR(1, 100, __pyx_L1_error)
30899 3 : __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(1, 156, __pyx_L1_error)
30900 3 : __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(1, 159, __pyx_L1_error)
30901 3 : __pyx_builtin_AssertionError = __Pyx_GetBuiltinName(__pyx_n_s_AssertionError); if (!__pyx_builtin_AssertionError) __PYX_ERR(1, 373, __pyx_L1_error)
30902 3 : __pyx_builtin_Ellipsis = __Pyx_GetBuiltinName(__pyx_n_s_Ellipsis); if (!__pyx_builtin_Ellipsis) __PYX_ERR(1, 408, __pyx_L1_error)
30903 3 : __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(1, 618, __pyx_L1_error)
30904 3 : __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(1, 914, __pyx_L1_error)
30905 3 : __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 1025, __pyx_L1_error)
30906 : return 0;
30907 : __pyx_L1_error:;
30908 : return -1;
30909 : }
30910 : /* #### Code section: cached_constants ### */
30911 :
30912 3 : static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
30913 : __Pyx_RefNannyDeclarations
30914 3 : __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
30915 :
30916 : /* "View.MemoryView":582
30917 : * def suboffsets(self):
30918 : * if self.view.suboffsets == NULL:
30919 : * return (-1,) * self.view.ndim # <<<<<<<<<<<<<<
30920 : *
30921 : * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
30922 : */
30923 3 : __pyx_tuple__4 = PyTuple_New(1); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(1, 582, __pyx_L1_error)
30924 3 : __Pyx_GOTREF(__pyx_tuple__4);
30925 3 : __Pyx_INCREF(__pyx_int_neg_1);
30926 3 : __Pyx_GIVEREF(__pyx_int_neg_1);
30927 3 : if (__Pyx_PyTuple_SET_ITEM(__pyx_tuple__4, 0, __pyx_int_neg_1)) __PYX_ERR(1, 582, __pyx_L1_error);
30928 3 : __Pyx_GIVEREF(__pyx_tuple__4);
30929 :
30930 : /* "View.MemoryView":679
30931 : * tup = <tuple>index if isinstance(index, tuple) else (index,)
30932 : *
30933 : * result = [slice(None)] * ndim # <<<<<<<<<<<<<<
30934 : * have_slices = False
30935 : * seen_ellipsis = False
30936 : */
30937 3 : __pyx_slice__5 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__5)) __PYX_ERR(1, 679, __pyx_L1_error)
30938 3 : __Pyx_GOTREF(__pyx_slice__5);
30939 3 : __Pyx_GIVEREF(__pyx_slice__5);
30940 :
30941 : /* "(tree fragment)":4
30942 : * cdef object __pyx_PickleError
30943 : * cdef object __pyx_result
30944 : * if __pyx_checksum not in (0x82a3537, 0x6ae9995, 0xb068931): # <<<<<<<<<<<<<<
30945 : * from pickle import PickleError as __pyx_PickleError
30946 : * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum
30947 : */
30948 3 : __pyx_tuple__8 = PyTuple_Pack(3, __pyx_int_136983863, __pyx_int_112105877, __pyx_int_184977713); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(1, 4, __pyx_L1_error)
30949 3 : __Pyx_GOTREF(__pyx_tuple__8);
30950 3 : __Pyx_GIVEREF(__pyx_tuple__8);
30951 :
30952 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1025
30953 : * __pyx_import_array()
30954 : * except Exception:
30955 : * raise ImportError("numpy._core.multiarray failed to import") # <<<<<<<<<<<<<<
30956 : *
30957 : * cdef inline int import_umath() except -1:
30958 : */
30959 3 : __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_u_numpy__core_multiarray_failed_to); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(2, 1025, __pyx_L1_error)
30960 3 : __Pyx_GOTREF(__pyx_tuple__9);
30961 3 : __Pyx_GIVEREF(__pyx_tuple__9);
30962 :
30963 : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1031
30964 : * _import_umath()
30965 : * except Exception:
30966 : * raise ImportError("numpy._core.umath failed to import") # <<<<<<<<<<<<<<
30967 : *
30968 : * cdef inline int import_ufunc() except -1:
30969 : */
30970 3 : __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_u_numpy__core_umath_failed_to_impo); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(2, 1031, __pyx_L1_error)
30971 3 : __Pyx_GOTREF(__pyx_tuple__10);
30972 3 : __Pyx_GIVEREF(__pyx_tuple__10);
30973 :
30974 : /* "scipy/stats/_sobol.pyx":69
30975 : *
30976 : * if poly_vinit is None:
30977 : * poly = np.empty((MAXDIM,), dtype=dtype) # <<<<<<<<<<<<<<
30978 : * vinit = np.empty((MAXDIM, MAXDEG), dtype=dtype)
30979 : *
30980 : */
30981 3 : __pyx_tuple__11 = PyTuple_Pack(1, __pyx_int_21201); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 69, __pyx_L1_error)
30982 3 : __Pyx_GOTREF(__pyx_tuple__11);
30983 3 : __Pyx_GIVEREF(__pyx_tuple__11);
30984 3 : __pyx_tuple__12 = PyTuple_Pack(1, __pyx_tuple__11); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 69, __pyx_L1_error)
30985 3 : __Pyx_GOTREF(__pyx_tuple__12);
30986 3 : __Pyx_GIVEREF(__pyx_tuple__12);
30987 :
30988 : /* "scipy/stats/_sobol.pyx":70
30989 : * if poly_vinit is None:
30990 : * poly = np.empty((MAXDIM,), dtype=dtype)
30991 : * vinit = np.empty((MAXDIM, MAXDEG), dtype=dtype) # <<<<<<<<<<<<<<
30992 : *
30993 : * _initialize_direction_numbers(poly, vinit, dtype)
30994 : */
30995 3 : __pyx_tuple__13 = PyTuple_Pack(2, __pyx_int_21201, __pyx_int_18); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 70, __pyx_L1_error)
30996 3 : __Pyx_GOTREF(__pyx_tuple__13);
30997 3 : __Pyx_GIVEREF(__pyx_tuple__13);
30998 3 : __pyx_tuple__14 = PyTuple_Pack(1, __pyx_tuple__13); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 70, __pyx_L1_error)
30999 3 : __Pyx_GOTREF(__pyx_tuple__14);
31000 3 : __Pyx_GIVEREF(__pyx_tuple__14);
31001 :
31002 : /* "scipy/stats/_sobol.pyx":149
31003 : * _curdir = importlib.resources.files("scipy.stats")
31004 : * _npzfile = _curdir.joinpath("_sobol_direction_numbers.npz")
31005 : * with importlib.resources.as_file(_npzfile) as f: # <<<<<<<<<<<<<<
31006 : * dns = np.load(f)
31007 : *
31008 : */
31009 3 : __pyx_tuple__15 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 149, __pyx_L1_error)
31010 3 : __Pyx_GOTREF(__pyx_tuple__15);
31011 3 : __Pyx_GIVEREF(__pyx_tuple__15);
31012 :
31013 : /* "scipy/stats/_sobol.pyx":244
31014 : * @cython.boundscheck(False)
31015 : * @cython.wraparound(False)
31016 : * cpdef void _initialize_v( # <<<<<<<<<<<<<<
31017 : * uint_32_64[:, ::1] v, const int dim, const int bits
31018 : * ) noexcept:
31019 : */
31020 3 : __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_No_matching_signature_found); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 244, __pyx_L1_error)
31021 3 : __Pyx_GOTREF(__pyx_tuple__18);
31022 3 : __Pyx_GIVEREF(__pyx_tuple__18);
31023 3 : __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_s_Function_call_with_ambiguous_arg); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 244, __pyx_L1_error)
31024 3 : __Pyx_GOTREF(__pyx_tuple__19);
31025 3 : __Pyx_GIVEREF(__pyx_tuple__19);
31026 :
31027 : /* "View.MemoryView":100
31028 : * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence"
31029 : * try:
31030 : * if __import__("sys").version_info >= (3, 3): # <<<<<<<<<<<<<<
31031 : * __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
31032 : * else:
31033 : */
31034 3 : __pyx_tuple__20 = PyTuple_Pack(1, __pyx_n_s_sys); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(1, 100, __pyx_L1_error)
31035 3 : __Pyx_GOTREF(__pyx_tuple__20);
31036 3 : __Pyx_GIVEREF(__pyx_tuple__20);
31037 3 : __pyx_tuple__21 = PyTuple_Pack(2, __pyx_int_3, __pyx_int_3); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(1, 100, __pyx_L1_error)
31038 3 : __Pyx_GOTREF(__pyx_tuple__21);
31039 3 : __Pyx_GIVEREF(__pyx_tuple__21);
31040 :
31041 : /* "View.MemoryView":101
31042 : * try:
31043 : * if __import__("sys").version_info >= (3, 3):
31044 : * __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence # <<<<<<<<<<<<<<
31045 : * else:
31046 : * __pyx_collections_abc_Sequence = __import__("collections").Sequence
31047 : */
31048 3 : __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_s_collections_abc); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(1, 101, __pyx_L1_error)
31049 3 : __Pyx_GOTREF(__pyx_tuple__22);
31050 3 : __Pyx_GIVEREF(__pyx_tuple__22);
31051 :
31052 : /* "View.MemoryView":103
31053 : * __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
31054 : * else:
31055 : * __pyx_collections_abc_Sequence = __import__("collections").Sequence # <<<<<<<<<<<<<<
31056 : * except:
31057 : *
31058 : */
31059 3 : __pyx_tuple__23 = PyTuple_Pack(1, __pyx_n_s_collections); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(1, 103, __pyx_L1_error)
31060 3 : __Pyx_GOTREF(__pyx_tuple__23);
31061 3 : __Pyx_GIVEREF(__pyx_tuple__23);
31062 :
31063 : /* "View.MemoryView":309
31064 : * return self.name
31065 : *
31066 : * cdef generic = Enum("<strided and direct or indirect>") # <<<<<<<<<<<<<<
31067 : * cdef strided = Enum("<strided and direct>") # default
31068 : * cdef indirect = Enum("<strided and indirect>")
31069 : */
31070 3 : __pyx_tuple__24 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct_or_indirect); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(1, 309, __pyx_L1_error)
31071 3 : __Pyx_GOTREF(__pyx_tuple__24);
31072 3 : __Pyx_GIVEREF(__pyx_tuple__24);
31073 :
31074 : /* "View.MemoryView":310
31075 : *
31076 : * cdef generic = Enum("<strided and direct or indirect>")
31077 : * cdef strided = Enum("<strided and direct>") # default # <<<<<<<<<<<<<<
31078 : * cdef indirect = Enum("<strided and indirect>")
31079 : *
31080 : */
31081 3 : __pyx_tuple__25 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(1, 310, __pyx_L1_error)
31082 3 : __Pyx_GOTREF(__pyx_tuple__25);
31083 3 : __Pyx_GIVEREF(__pyx_tuple__25);
31084 :
31085 : /* "View.MemoryView":311
31086 : * cdef generic = Enum("<strided and direct or indirect>")
31087 : * cdef strided = Enum("<strided and direct>") # default
31088 : * cdef indirect = Enum("<strided and indirect>") # <<<<<<<<<<<<<<
31089 : *
31090 : *
31091 : */
31092 3 : __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_s_strided_and_indirect); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(1, 311, __pyx_L1_error)
31093 3 : __Pyx_GOTREF(__pyx_tuple__26);
31094 3 : __Pyx_GIVEREF(__pyx_tuple__26);
31095 :
31096 : /* "View.MemoryView":314
31097 : *
31098 : *
31099 : * cdef contiguous = Enum("<contiguous and direct>") # <<<<<<<<<<<<<<
31100 : * cdef indirect_contiguous = Enum("<contiguous and indirect>")
31101 : *
31102 : */
31103 3 : __pyx_tuple__27 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_direct); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(1, 314, __pyx_L1_error)
31104 3 : __Pyx_GOTREF(__pyx_tuple__27);
31105 3 : __Pyx_GIVEREF(__pyx_tuple__27);
31106 :
31107 : /* "View.MemoryView":315
31108 : *
31109 : * cdef contiguous = Enum("<contiguous and direct>")
31110 : * cdef indirect_contiguous = Enum("<contiguous and indirect>") # <<<<<<<<<<<<<<
31111 : *
31112 : *
31113 : */
31114 3 : __pyx_tuple__28 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_indirect); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(1, 315, __pyx_L1_error)
31115 3 : __Pyx_GOTREF(__pyx_tuple__28);
31116 3 : __Pyx_GIVEREF(__pyx_tuple__28);
31117 :
31118 : /* "(tree fragment)":1
31119 : * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
31120 : * cdef object __pyx_PickleError
31121 : * cdef object __pyx_result
31122 : */
31123 3 : __pyx_tuple__29 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(1, 1, __pyx_L1_error)
31124 3 : __Pyx_GOTREF(__pyx_tuple__29);
31125 3 : __Pyx_GIVEREF(__pyx_tuple__29);
31126 3 : __pyx_codeobj__30 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__29, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Enum, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__30)) __PYX_ERR(1, 1, __pyx_L1_error)
31127 :
31128 : /* "scipy/stats/_sobol.pyx":3
31129 : * # cython: language_level=3
31130 : * # cython: cdivision=True
31131 : * import importlib.resources # <<<<<<<<<<<<<<
31132 : *
31133 : * cimport cython
31134 : */
31135 3 : __pyx_tuple__31 = PyTuple_Pack(2, __pyx_n_s_importlib, __pyx_n_s_resources); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 3, __pyx_L1_error)
31136 3 : __Pyx_GOTREF(__pyx_tuple__31);
31137 3 : __Pyx_GIVEREF(__pyx_tuple__31);
31138 :
31139 : /* "scipy/stats/_sobol.pyx":40
31140 : *
31141 : *
31142 : * def get_poly_vinit(kind, dtype): # <<<<<<<<<<<<<<
31143 : * """Initialize and cache the direction numbers.
31144 : *
31145 : */
31146 3 : __pyx_tuple__32 = PyTuple_Pack(5, __pyx_n_s_kind, __pyx_n_s_dtype, __pyx_n_s_poly_vinit, __pyx_n_s_poly, __pyx_n_s_vinit); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 40, __pyx_L1_error)
31147 3 : __Pyx_GOTREF(__pyx_tuple__32);
31148 3 : __Pyx_GIVEREF(__pyx_tuple__32);
31149 3 : __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_czgdp18079_Quansight_scipy, __pyx_n_s_get_poly_vinit, 40, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(0, 40, __pyx_L1_error)
31150 :
31151 : /* "scipy/stats/_sobol.pyx":85
31152 : *
31153 : *
31154 : * def _initialize_direction_numbers(poly, vinit, dtype): # <<<<<<<<<<<<<<
31155 : * """Load direction numbers into two arrays.
31156 : *
31157 : */
31158 3 : __pyx_tuple__34 = PyTuple_Pack(9, __pyx_n_s_poly, __pyx_n_s_vinit, __pyx_n_s_dtype, __pyx_n_s_curdir, __pyx_n_s_npzfile, __pyx_n_s_f, __pyx_n_s_dns, __pyx_n_s_dns_poly, __pyx_n_s_dns_vinit); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 85, __pyx_L1_error)
31159 3 : __Pyx_GOTREF(__pyx_tuple__34);
31160 3 : __Pyx_GIVEREF(__pyx_tuple__34);
31161 3 : __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_czgdp18079_Quansight_scipy, __pyx_n_s_initialize_direction_numbers, 85, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(0, 85, __pyx_L1_error)
31162 :
31163 : /* "scipy/stats/_sobol.pyx":244
31164 : * @cython.boundscheck(False)
31165 : * @cython.wraparound(False)
31166 : * cpdef void _initialize_v( # <<<<<<<<<<<<<<
31167 : * uint_32_64[:, ::1] v, const int dim, const int bits
31168 : * ) noexcept:
31169 : */
31170 3 : __pyx_tuple__36 = PyTuple_Pack(3, __pyx_n_s_v, __pyx_n_s_dim, __pyx_n_s_bits); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 244, __pyx_L1_error)
31171 3 : __Pyx_GOTREF(__pyx_tuple__36);
31172 3 : __Pyx_GIVEREF(__pyx_tuple__36);
31173 3 : __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_czgdp18079_Quansight_scipy, __pyx_n_s_pyx_fuse_0_initialize_v, 244, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(0, 244, __pyx_L1_error)
31174 3 : __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_czgdp18079_Quansight_scipy, __pyx_n_s_pyx_fuse_0_initialize_v, 244, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__38)) __PYX_ERR(0, 244, __pyx_L1_error)
31175 3 : __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_czgdp18079_Quansight_scipy, __pyx_n_s_pyx_fuse_1_initialize_v, 244, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(0, 244, __pyx_L1_error)
31176 :
31177 : /* "scipy/stats/_sobol.pyx":298
31178 : *
31179 : *
31180 : * def _draw( # <<<<<<<<<<<<<<
31181 : * n,
31182 : * num_gen,
31183 : */
31184 3 : __pyx_tuple__40 = PyTuple_Pack(9, __pyx_n_s_n, __pyx_n_s_num_gen, __pyx_n_s_dim, __pyx_n_s_scale, __pyx_n_s_sv, __pyx_n_s_quasi, __pyx_n_s_sample, __pyx_n_s_n_2, __pyx_n_s_num_gen_2); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 298, __pyx_L1_error)
31185 3 : __Pyx_GOTREF(__pyx_tuple__40);
31186 3 : __Pyx_GIVEREF(__pyx_tuple__40);
31187 3 : __pyx_codeobj__41 = (PyObject*)__Pyx_PyCode_New(7, 0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__40, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_czgdp18079_Quansight_scipy, __pyx_n_s_draw, 298, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__41)) __PYX_ERR(0, 298, __pyx_L1_error)
31188 :
31189 : /* "scipy/stats/_sobol.pyx":339
31190 : * @cython.boundscheck(False)
31191 : * @cython.wraparound(False)
31192 : * cpdef void _fast_forward(const uint_32_64 n, # <<<<<<<<<<<<<<
31193 : * const uint_32_64 num_gen,
31194 : * const int dim,
31195 : */
31196 3 : __pyx_tuple__42 = PyTuple_Pack(5, __pyx_n_s_n, __pyx_n_s_num_gen, __pyx_n_s_dim, __pyx_n_s_sv, __pyx_n_s_quasi); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 339, __pyx_L1_error)
31197 3 : __Pyx_GOTREF(__pyx_tuple__42);
31198 3 : __Pyx_GIVEREF(__pyx_tuple__42);
31199 3 : __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__42, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_czgdp18079_Quansight_scipy, __pyx_n_s_pyx_fuse_0_fast_forward, 339, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) __PYX_ERR(0, 339, __pyx_L1_error)
31200 3 : __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__42, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_czgdp18079_Quansight_scipy, __pyx_n_s_pyx_fuse_0_fast_forward, 339, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__44)) __PYX_ERR(0, 339, __pyx_L1_error)
31201 3 : __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__42, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_czgdp18079_Quansight_scipy, __pyx_n_s_pyx_fuse_1_fast_forward, 339, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(0, 339, __pyx_L1_error)
31202 :
31203 : /* "scipy/stats/_sobol.pyx":369
31204 : * @cython.boundscheck(False)
31205 : * @cython.wraparound(False)
31206 : * cpdef void _cscramble(const int dim, # <<<<<<<<<<<<<<
31207 : * const int bits,
31208 : * uint_32_64[:, :, ::1] ltm,
31209 : */
31210 3 : __pyx_tuple__46 = PyTuple_Pack(4, __pyx_n_s_dim, __pyx_n_s_bits, __pyx_n_s_ltm, __pyx_n_s_sv); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 369, __pyx_L1_error)
31211 3 : __Pyx_GOTREF(__pyx_tuple__46);
31212 3 : __Pyx_GIVEREF(__pyx_tuple__46);
31213 3 : __pyx_codeobj__47 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__46, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_czgdp18079_Quansight_scipy, __pyx_n_s_pyx_fuse_0_cscramble, 369, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__47)) __PYX_ERR(0, 369, __pyx_L1_error)
31214 3 : __pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__46, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_czgdp18079_Quansight_scipy, __pyx_n_s_pyx_fuse_0_cscramble, 369, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__48)) __PYX_ERR(0, 369, __pyx_L1_error)
31215 3 : __pyx_codeobj__49 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__46, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_czgdp18079_Quansight_scipy, __pyx_n_s_pyx_fuse_1_cscramble, 369, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__49)) __PYX_ERR(0, 369, __pyx_L1_error)
31216 :
31217 : /* "scipy/stats/_sobol.pyx":400
31218 : * @cython.boundscheck(False)
31219 : * @cython.wraparound(False)
31220 : * cpdef void _fill_p_cumulative(const cnp.float_t[::1] p, # <<<<<<<<<<<<<<
31221 : * cnp.float_t[::1] p_cumulative) noexcept nogil:
31222 : * cdef int i
31223 : */
31224 3 : __pyx_tuple__50 = PyTuple_Pack(2, __pyx_n_s_p, __pyx_n_s_p_cumulative); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 400, __pyx_L1_error)
31225 3 : __Pyx_GOTREF(__pyx_tuple__50);
31226 3 : __Pyx_GIVEREF(__pyx_tuple__50);
31227 3 : __pyx_codeobj__51 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__50, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_czgdp18079_Quansight_scipy, __pyx_n_s_fill_p_cumulative, 400, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__51)) __PYX_ERR(0, 400, __pyx_L1_error)
31228 :
31229 : /* "scipy/stats/_sobol.pyx":414
31230 : * @cython.boundscheck(False)
31231 : * @cython.wraparound(False)
31232 : * cpdef void _categorize(const cnp.float_t[::1] draws, # <<<<<<<<<<<<<<
31233 : * const cnp.float_t[::1] p_cumulative,
31234 : * cnp.intp_t[::1] result) noexcept nogil:
31235 : */
31236 3 : __pyx_tuple__52 = PyTuple_Pack(3, __pyx_n_s_draws, __pyx_n_s_p_cumulative, __pyx_n_s_result); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 414, __pyx_L1_error)
31237 3 : __Pyx_GOTREF(__pyx_tuple__52);
31238 3 : __Pyx_GIVEREF(__pyx_tuple__52);
31239 3 : __pyx_codeobj__53 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__52, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_czgdp18079_Quansight_scipy, __pyx_n_s_categorize, 414, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__53)) __PYX_ERR(0, 414, __pyx_L1_error)
31240 :
31241 : /* "scipy/stats/_sobol.pyx":441
31242 : *
31243 : *
31244 : * def _test_find_index(p_cumulative, size, value): # <<<<<<<<<<<<<<
31245 : * # type: (np.ndarray, int, float) -> int
31246 : * """Wrapper for testing in python"""
31247 : */
31248 3 : __pyx_tuple__54 = PyTuple_Pack(3, __pyx_n_s_p_cumulative, __pyx_n_s_size, __pyx_n_s_value); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(0, 441, __pyx_L1_error)
31249 3 : __Pyx_GOTREF(__pyx_tuple__54);
31250 3 : __Pyx_GIVEREF(__pyx_tuple__54);
31251 3 : __pyx_codeobj__55 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_czgdp18079_Quansight_scipy, __pyx_n_s_test_find_index, 441, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__55)) __PYX_ERR(0, 441, __pyx_L1_error)
31252 : __Pyx_RefNannyFinishContext();
31253 : return 0;
31254 : __pyx_L1_error:;
31255 : __Pyx_RefNannyFinishContext();
31256 : return -1;
31257 : }
31258 : /* #### Code section: init_constants ### */
31259 :
31260 3 : static CYTHON_SMALL_CODE int __Pyx_InitConstants(void) {
31261 3 : __pyx_umethod_PyDict_Type_get.type = (PyObject*)&PyDict_Type;
31262 3 : __pyx_umethod_PyDict_Type_get.method_name = &__pyx_n_s_get;
31263 3 : __pyx_umethod_PyDict_Type_values.type = (PyObject*)&PyDict_Type;
31264 3 : __pyx_umethod_PyDict_Type_values.method_name = &__pyx_n_s_values;
31265 3 : if (__Pyx_CreateStringTabAndInitStrings() < 0) __PYX_ERR(0, 1, __pyx_L1_error);
31266 3 : __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
31267 3 : __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
31268 3 : __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error)
31269 3 : __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error)
31270 3 : __pyx_int_5 = PyInt_FromLong(5); if (unlikely(!__pyx_int_5)) __PYX_ERR(0, 1, __pyx_L1_error)
31271 3 : __pyx_int_7 = PyInt_FromLong(7); if (unlikely(!__pyx_int_7)) __PYX_ERR(0, 1, __pyx_L1_error)
31272 3 : __pyx_int_18 = PyInt_FromLong(18); if (unlikely(!__pyx_int_18)) __PYX_ERR(0, 1, __pyx_L1_error)
31273 3 : __pyx_int_21201 = PyInt_FromLong(21201L); if (unlikely(!__pyx_int_21201)) __PYX_ERR(0, 1, __pyx_L1_error)
31274 3 : __pyx_int_112105877 = PyInt_FromLong(112105877L); if (unlikely(!__pyx_int_112105877)) __PYX_ERR(0, 1, __pyx_L1_error)
31275 3 : __pyx_int_136983863 = PyInt_FromLong(136983863L); if (unlikely(!__pyx_int_136983863)) __PYX_ERR(0, 1, __pyx_L1_error)
31276 3 : __pyx_int_184977713 = PyInt_FromLong(184977713L); if (unlikely(!__pyx_int_184977713)) __PYX_ERR(0, 1, __pyx_L1_error)
31277 3 : __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
31278 : return 0;
31279 : __pyx_L1_error:;
31280 : return -1;
31281 : }
31282 : /* #### Code section: init_globals ### */
31283 :
31284 3 : static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
31285 : /* AssertionsEnabled.init */
31286 3 : if (likely(__Pyx_init_assertions_enabled() == 0)); else
31287 :
31288 0 : if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
31289 :
31290 : return 0;
31291 0 : __pyx_L1_error:;
31292 0 : return -1;
31293 : }
31294 : /* #### Code section: init_module ### */
31295 :
31296 : static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
31297 : static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
31298 : static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
31299 : static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
31300 : static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
31301 : static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
31302 : static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/
31303 :
31304 3 : static int __Pyx_modinit_global_init_code(void) {
31305 : __Pyx_RefNannyDeclarations
31306 3 : __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
31307 : /*--- Global init code ---*/
31308 3 : __pyx_collections_abc_Sequence = Py_None; Py_INCREF(Py_None);
31309 3 : generic = Py_None; Py_INCREF(Py_None);
31310 3 : strided = Py_None; Py_INCREF(Py_None);
31311 3 : indirect = Py_None; Py_INCREF(Py_None);
31312 3 : contiguous = Py_None; Py_INCREF(Py_None);
31313 3 : indirect_contiguous = Py_None; Py_INCREF(Py_None);
31314 3 : __Pyx_RefNannyFinishContext();
31315 3 : return 0;
31316 : }
31317 :
31318 : static int __Pyx_modinit_variable_export_code(void) {
31319 : __Pyx_RefNannyDeclarations
31320 : __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
31321 : /*--- Variable export code ---*/
31322 : __Pyx_RefNannyFinishContext();
31323 : return 0;
31324 : }
31325 :
31326 : static int __Pyx_modinit_function_export_code(void) {
31327 : __Pyx_RefNannyDeclarations
31328 : __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
31329 : /*--- Function export code ---*/
31330 : __Pyx_RefNannyFinishContext();
31331 : return 0;
31332 : }
31333 :
31334 3 : static int __Pyx_modinit_type_init_code(void) {
31335 : __Pyx_RefNannyDeclarations
31336 3 : PyObject *__pyx_t_1 = NULL;
31337 3 : int __pyx_lineno = 0;
31338 3 : const char *__pyx_filename = NULL;
31339 3 : int __pyx_clineno = 0;
31340 3 : __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
31341 : /*--- Type init code ---*/
31342 3 : __pyx_vtabptr_array = &__pyx_vtable_array;
31343 3 : __pyx_vtable_array.get_memview = (PyObject *(*)(struct __pyx_array_obj *))__pyx_array_get_memview;
31344 : #if CYTHON_USE_TYPE_SPECS
31345 : __pyx_array_type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type___pyx_array_spec, NULL); if (unlikely(!__pyx_array_type)) __PYX_ERR(1, 114, __pyx_L1_error)
31346 : #if !CYTHON_COMPILING_IN_LIMITED_API
31347 : __pyx_array_type->tp_as_buffer = &__pyx_tp_as_buffer_array;
31348 : if (!__pyx_array_type->tp_as_buffer->bf_releasebuffer && __pyx_array_type->tp_base->tp_as_buffer && __pyx_array_type->tp_base->tp_as_buffer->bf_releasebuffer) {
31349 : __pyx_array_type->tp_as_buffer->bf_releasebuffer = __pyx_array_type->tp_base->tp_as_buffer->bf_releasebuffer;
31350 : }
31351 : #elif defined(Py_bf_getbuffer) && defined(Py_bf_releasebuffer)
31352 : /* PY_VERSION_HEX >= 0x03090000 || Py_LIMITED_API >= 0x030B0000 */
31353 : #elif defined(_MSC_VER)
31354 : #pragma message ("The buffer protocol is not supported in the Limited C-API < 3.11.")
31355 : #else
31356 : #warning "The buffer protocol is not supported in the Limited C-API < 3.11."
31357 : #endif
31358 : if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_array_spec, __pyx_array_type) < 0) __PYX_ERR(1, 114, __pyx_L1_error)
31359 : #else
31360 3 : __pyx_array_type = &__pyx_type___pyx_array;
31361 : #endif
31362 : #if !CYTHON_COMPILING_IN_LIMITED_API
31363 : #endif
31364 : #if !CYTHON_USE_TYPE_SPECS
31365 3 : if (__Pyx_PyType_Ready(__pyx_array_type) < 0) __PYX_ERR(1, 114, __pyx_L1_error)
31366 : #endif
31367 : #if PY_MAJOR_VERSION < 3
31368 : __pyx_array_type->tp_print = 0;
31369 : #endif
31370 3 : if (__Pyx_SetVtable(__pyx_array_type, __pyx_vtabptr_array) < 0) __PYX_ERR(1, 114, __pyx_L1_error)
31371 : #if !CYTHON_COMPILING_IN_LIMITED_API
31372 3 : if (__Pyx_MergeVtables(__pyx_array_type) < 0) __PYX_ERR(1, 114, __pyx_L1_error)
31373 : #endif
31374 : #if !CYTHON_COMPILING_IN_LIMITED_API
31375 3 : if (__Pyx_setup_reduce((PyObject *) __pyx_array_type) < 0) __PYX_ERR(1, 114, __pyx_L1_error)
31376 : #endif
31377 : #if CYTHON_USE_TYPE_SPECS
31378 : __pyx_MemviewEnum_type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type___pyx_MemviewEnum_spec, NULL); if (unlikely(!__pyx_MemviewEnum_type)) __PYX_ERR(1, 302, __pyx_L1_error)
31379 : if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_MemviewEnum_spec, __pyx_MemviewEnum_type) < 0) __PYX_ERR(1, 302, __pyx_L1_error)
31380 : #else
31381 3 : __pyx_MemviewEnum_type = &__pyx_type___pyx_MemviewEnum;
31382 : #endif
31383 : #if !CYTHON_COMPILING_IN_LIMITED_API
31384 : #endif
31385 : #if !CYTHON_USE_TYPE_SPECS
31386 3 : if (__Pyx_PyType_Ready(__pyx_MemviewEnum_type) < 0) __PYX_ERR(1, 302, __pyx_L1_error)
31387 : #endif
31388 : #if PY_MAJOR_VERSION < 3
31389 : __pyx_MemviewEnum_type->tp_print = 0;
31390 : #endif
31391 : #if !CYTHON_COMPILING_IN_LIMITED_API
31392 3 : if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_MemviewEnum_type->tp_dictoffset && __pyx_MemviewEnum_type->tp_getattro == PyObject_GenericGetAttr)) {
31393 3 : __pyx_MemviewEnum_type->tp_getattro = __Pyx_PyObject_GenericGetAttr;
31394 : }
31395 : #endif
31396 : #if !CYTHON_COMPILING_IN_LIMITED_API
31397 3 : if (__Pyx_setup_reduce((PyObject *) __pyx_MemviewEnum_type) < 0) __PYX_ERR(1, 302, __pyx_L1_error)
31398 : #endif
31399 3 : __pyx_vtabptr_memoryview = &__pyx_vtable_memoryview;
31400 3 : __pyx_vtable_memoryview.get_item_pointer = (char *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_get_item_pointer;
31401 3 : __pyx_vtable_memoryview.is_slice = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_is_slice;
31402 3 : __pyx_vtable_memoryview.setitem_slice_assignment = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_slice_assignment;
31403 3 : __pyx_vtable_memoryview.setitem_slice_assign_scalar = (PyObject *(*)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_setitem_slice_assign_scalar;
31404 3 : __pyx_vtable_memoryview.setitem_indexed = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_indexed;
31405 3 : __pyx_vtable_memoryview.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryview_convert_item_to_object;
31406 3 : __pyx_vtable_memoryview.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryview_assign_item_from_object;
31407 3 : __pyx_vtable_memoryview._get_base = (PyObject *(*)(struct __pyx_memoryview_obj *))__pyx_memoryview__get_base;
31408 : #if CYTHON_USE_TYPE_SPECS
31409 : __pyx_memoryview_type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type___pyx_memoryview_spec, NULL); if (unlikely(!__pyx_memoryview_type)) __PYX_ERR(1, 337, __pyx_L1_error)
31410 : #if !CYTHON_COMPILING_IN_LIMITED_API
31411 : __pyx_memoryview_type->tp_as_buffer = &__pyx_tp_as_buffer_memoryview;
31412 : if (!__pyx_memoryview_type->tp_as_buffer->bf_releasebuffer && __pyx_memoryview_type->tp_base->tp_as_buffer && __pyx_memoryview_type->tp_base->tp_as_buffer->bf_releasebuffer) {
31413 : __pyx_memoryview_type->tp_as_buffer->bf_releasebuffer = __pyx_memoryview_type->tp_base->tp_as_buffer->bf_releasebuffer;
31414 : }
31415 : #elif defined(Py_bf_getbuffer) && defined(Py_bf_releasebuffer)
31416 : /* PY_VERSION_HEX >= 0x03090000 || Py_LIMITED_API >= 0x030B0000 */
31417 : #elif defined(_MSC_VER)
31418 : #pragma message ("The buffer protocol is not supported in the Limited C-API < 3.11.")
31419 : #else
31420 : #warning "The buffer protocol is not supported in the Limited C-API < 3.11."
31421 : #endif
31422 : if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_memoryview_spec, __pyx_memoryview_type) < 0) __PYX_ERR(1, 337, __pyx_L1_error)
31423 : #else
31424 3 : __pyx_memoryview_type = &__pyx_type___pyx_memoryview;
31425 : #endif
31426 : #if !CYTHON_COMPILING_IN_LIMITED_API
31427 : #endif
31428 : #if !CYTHON_USE_TYPE_SPECS
31429 3 : if (__Pyx_PyType_Ready(__pyx_memoryview_type) < 0) __PYX_ERR(1, 337, __pyx_L1_error)
31430 : #endif
31431 : #if PY_MAJOR_VERSION < 3
31432 : __pyx_memoryview_type->tp_print = 0;
31433 : #endif
31434 : #if !CYTHON_COMPILING_IN_LIMITED_API
31435 3 : if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_memoryview_type->tp_dictoffset && __pyx_memoryview_type->tp_getattro == PyObject_GenericGetAttr)) {
31436 3 : __pyx_memoryview_type->tp_getattro = __Pyx_PyObject_GenericGetAttr;
31437 : }
31438 : #endif
31439 3 : if (__Pyx_SetVtable(__pyx_memoryview_type, __pyx_vtabptr_memoryview) < 0) __PYX_ERR(1, 337, __pyx_L1_error)
31440 : #if !CYTHON_COMPILING_IN_LIMITED_API
31441 3 : if (__Pyx_MergeVtables(__pyx_memoryview_type) < 0) __PYX_ERR(1, 337, __pyx_L1_error)
31442 : #endif
31443 : #if !CYTHON_COMPILING_IN_LIMITED_API
31444 3 : if (__Pyx_setup_reduce((PyObject *) __pyx_memoryview_type) < 0) __PYX_ERR(1, 337, __pyx_L1_error)
31445 : #endif
31446 3 : __pyx_vtabptr__memoryviewslice = &__pyx_vtable__memoryviewslice;
31447 3 : __pyx_vtable__memoryviewslice.__pyx_base = *__pyx_vtabptr_memoryview;
31448 3 : __pyx_vtable__memoryviewslice.__pyx_base.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryviewslice_convert_item_to_object;
31449 3 : __pyx_vtable__memoryviewslice.__pyx_base.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryviewslice_assign_item_from_object;
31450 3 : __pyx_vtable__memoryviewslice.__pyx_base._get_base = (PyObject *(*)(struct __pyx_memoryview_obj *))__pyx_memoryviewslice__get_base;
31451 : #if CYTHON_USE_TYPE_SPECS
31452 : __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_memoryview_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 952, __pyx_L1_error)
31453 : __Pyx_GOTREF(__pyx_t_1);
31454 : __pyx_memoryviewslice_type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type___pyx_memoryviewslice_spec, __pyx_t_1);
31455 : __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
31456 : if (unlikely(!__pyx_memoryviewslice_type)) __PYX_ERR(1, 952, __pyx_L1_error)
31457 : if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_memoryviewslice_spec, __pyx_memoryviewslice_type) < 0) __PYX_ERR(1, 952, __pyx_L1_error)
31458 : #else
31459 3 : __pyx_memoryviewslice_type = &__pyx_type___pyx_memoryviewslice;
31460 : #endif
31461 : #if !CYTHON_COMPILING_IN_LIMITED_API
31462 3 : __pyx_memoryviewslice_type->tp_base = __pyx_memoryview_type;
31463 : #endif
31464 : #if !CYTHON_USE_TYPE_SPECS
31465 3 : if (__Pyx_PyType_Ready(__pyx_memoryviewslice_type) < 0) __PYX_ERR(1, 952, __pyx_L1_error)
31466 : #endif
31467 : #if PY_MAJOR_VERSION < 3
31468 : __pyx_memoryviewslice_type->tp_print = 0;
31469 : #endif
31470 : #if !CYTHON_COMPILING_IN_LIMITED_API
31471 3 : if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_memoryviewslice_type->tp_dictoffset && __pyx_memoryviewslice_type->tp_getattro == PyObject_GenericGetAttr)) {
31472 3 : __pyx_memoryviewslice_type->tp_getattro = __Pyx_PyObject_GenericGetAttr;
31473 : }
31474 : #endif
31475 3 : if (__Pyx_SetVtable(__pyx_memoryviewslice_type, __pyx_vtabptr__memoryviewslice) < 0) __PYX_ERR(1, 952, __pyx_L1_error)
31476 : #if !CYTHON_COMPILING_IN_LIMITED_API
31477 3 : if (__Pyx_MergeVtables(__pyx_memoryviewslice_type) < 0) __PYX_ERR(1, 952, __pyx_L1_error)
31478 : #endif
31479 : #if !CYTHON_COMPILING_IN_LIMITED_API
31480 3 : if (__Pyx_setup_reduce((PyObject *) __pyx_memoryviewslice_type) < 0) __PYX_ERR(1, 952, __pyx_L1_error)
31481 : #endif
31482 : __Pyx_RefNannyFinishContext();
31483 : return 0;
31484 0 : __pyx_L1_error:;
31485 0 : __Pyx_XDECREF(__pyx_t_1);
31486 0 : __Pyx_RefNannyFinishContext();
31487 0 : return -1;
31488 : }
31489 :
31490 3 : static int __Pyx_modinit_type_import_code(void) {
31491 : __Pyx_RefNannyDeclarations
31492 3 : PyObject *__pyx_t_1 = NULL;
31493 3 : int __pyx_lineno = 0;
31494 3 : const char *__pyx_filename = NULL;
31495 3 : int __pyx_clineno = 0;
31496 3 : __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
31497 : /*--- Type import code ---*/
31498 3 : __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 9, __pyx_L1_error)
31499 3 : __Pyx_GOTREF(__pyx_t_1);
31500 3 : __pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_0_11(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type",
31501 : #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
31502 : sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyTypeObject),
31503 : #elif CYTHON_COMPILING_IN_LIMITED_API
31504 : sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyTypeObject),
31505 : #else
31506 : sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyHeapTypeObject),
31507 : #endif
31508 3 : __Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(3, 9, __pyx_L1_error)
31509 3 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
31510 3 : __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 271, __pyx_L1_error)
31511 3 : __Pyx_GOTREF(__pyx_t_1);
31512 3 : __pyx_ptype_5numpy_dtype = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyArray_Descr),__Pyx_ImportType_CheckSize_Ignore_3_0_11); if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 271, __pyx_L1_error)
31513 3 : __pyx_ptype_5numpy_flatiter = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyArrayIterObject),__Pyx_ImportType_CheckSize_Ignore_3_0_11); if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 316, __pyx_L1_error)
31514 3 : __pyx_ptype_5numpy_broadcast = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyArrayMultiIterObject),__Pyx_ImportType_CheckSize_Ignore_3_0_11); if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 320, __pyx_L1_error)
31515 3 : __pyx_ptype_5numpy_ndarray = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyArrayObject),__Pyx_ImportType_CheckSize_Ignore_3_0_11); if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 359, __pyx_L1_error)
31516 3 : __pyx_ptype_5numpy_generic = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "generic", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5numpy_generic) __PYX_ERR(2, 847, __pyx_L1_error)
31517 3 : __pyx_ptype_5numpy_number = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "number", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5numpy_number) __PYX_ERR(2, 849, __pyx_L1_error)
31518 3 : __pyx_ptype_5numpy_integer = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "integer", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5numpy_integer) __PYX_ERR(2, 851, __pyx_L1_error)
31519 3 : __pyx_ptype_5numpy_signedinteger = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "signedinteger", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5numpy_signedinteger) __PYX_ERR(2, 853, __pyx_L1_error)
31520 3 : __pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "unsignedinteger", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(2, 855, __pyx_L1_error)
31521 3 : __pyx_ptype_5numpy_inexact = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "inexact", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5numpy_inexact) __PYX_ERR(2, 857, __pyx_L1_error)
31522 3 : __pyx_ptype_5numpy_floating = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "floating", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5numpy_floating) __PYX_ERR(2, 859, __pyx_L1_error)
31523 3 : __pyx_ptype_5numpy_complexfloating = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "complexfloating", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5numpy_complexfloating) __PYX_ERR(2, 861, __pyx_L1_error)
31524 3 : __pyx_ptype_5numpy_flexible = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "flexible", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5numpy_flexible) __PYX_ERR(2, 863, __pyx_L1_error)
31525 3 : __pyx_ptype_5numpy_character = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "character", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5numpy_character) __PYX_ERR(2, 865, __pyx_L1_error)
31526 3 : __pyx_ptype_5numpy_ufunc = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyUFuncObject),__Pyx_ImportType_CheckSize_Ignore_3_0_11); if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 929, __pyx_L1_error)
31527 3 : __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
31528 : __Pyx_RefNannyFinishContext();
31529 : return 0;
31530 0 : __pyx_L1_error:;
31531 0 : __Pyx_XDECREF(__pyx_t_1);
31532 0 : __Pyx_RefNannyFinishContext();
31533 0 : return -1;
31534 : }
31535 :
31536 : static int __Pyx_modinit_variable_import_code(void) {
31537 : __Pyx_RefNannyDeclarations
31538 : __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
31539 : /*--- Variable import code ---*/
31540 : __Pyx_RefNannyFinishContext();
31541 : return 0;
31542 : }
31543 :
31544 : static int __Pyx_modinit_function_import_code(void) {
31545 : __Pyx_RefNannyDeclarations
31546 : __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
31547 : /*--- Function import code ---*/
31548 : __Pyx_RefNannyFinishContext();
31549 : return 0;
31550 : }
31551 :
31552 :
31553 : #if PY_MAJOR_VERSION >= 3
31554 : #if CYTHON_PEP489_MULTI_PHASE_INIT
31555 : static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
31556 : static int __pyx_pymod_exec__sobol(PyObject* module); /*proto*/
31557 : static PyModuleDef_Slot __pyx_moduledef_slots[] = {
31558 : {Py_mod_create, (void*)__pyx_pymod_create},
31559 : {Py_mod_exec, (void*)__pyx_pymod_exec__sobol},
31560 : {0, NULL}
31561 : };
31562 : #endif
31563 :
31564 : #ifdef __cplusplus
31565 : namespace {
31566 : struct PyModuleDef __pyx_moduledef =
31567 : #else
31568 : static struct PyModuleDef __pyx_moduledef =
31569 : #endif
31570 : {
31571 : PyModuleDef_HEAD_INIT,
31572 : "_sobol",
31573 : 0, /* m_doc */
31574 : #if CYTHON_PEP489_MULTI_PHASE_INIT
31575 : 0, /* m_size */
31576 : #elif CYTHON_USE_MODULE_STATE
31577 : sizeof(__pyx_mstate), /* m_size */
31578 : #else
31579 : -1, /* m_size */
31580 : #endif
31581 : __pyx_methods /* m_methods */,
31582 : #if CYTHON_PEP489_MULTI_PHASE_INIT
31583 : __pyx_moduledef_slots, /* m_slots */
31584 : #else
31585 : NULL, /* m_reload */
31586 : #endif
31587 : #if CYTHON_USE_MODULE_STATE
31588 : __pyx_m_traverse, /* m_traverse */
31589 : __pyx_m_clear, /* m_clear */
31590 : NULL /* m_free */
31591 : #else
31592 : NULL, /* m_traverse */
31593 : NULL, /* m_clear */
31594 : NULL /* m_free */
31595 : #endif
31596 : };
31597 : #ifdef __cplusplus
31598 : } /* anonymous namespace */
31599 : #endif
31600 : #endif
31601 :
31602 : #ifndef CYTHON_NO_PYINIT_EXPORT
31603 : #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
31604 : #elif PY_MAJOR_VERSION < 3
31605 : #ifdef __cplusplus
31606 : #define __Pyx_PyMODINIT_FUNC extern "C" void
31607 : #else
31608 : #define __Pyx_PyMODINIT_FUNC void
31609 : #endif
31610 : #else
31611 : #ifdef __cplusplus
31612 : #define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
31613 : #else
31614 : #define __Pyx_PyMODINIT_FUNC PyObject *
31615 : #endif
31616 : #endif
31617 :
31618 :
31619 : #if PY_MAJOR_VERSION < 3
31620 : __Pyx_PyMODINIT_FUNC init_sobol(void) CYTHON_SMALL_CODE; /*proto*/
31621 : __Pyx_PyMODINIT_FUNC init_sobol(void)
31622 : #else
31623 : __Pyx_PyMODINIT_FUNC PyInit__sobol(void) CYTHON_SMALL_CODE; /*proto*/
31624 3 : __Pyx_PyMODINIT_FUNC PyInit__sobol(void)
31625 : #if CYTHON_PEP489_MULTI_PHASE_INIT
31626 : {
31627 3 : return PyModuleDef_Init(&__pyx_moduledef);
31628 : }
31629 3 : static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
31630 : #if PY_VERSION_HEX >= 0x030700A1
31631 3 : static PY_INT64_T main_interpreter_id = -1;
31632 3 : PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
31633 3 : if (main_interpreter_id == -1) {
31634 3 : main_interpreter_id = current_id;
31635 6 : return (unlikely(current_id == -1)) ? -1 : 0;
31636 0 : } else if (unlikely(main_interpreter_id != current_id))
31637 : #else
31638 : static PyInterpreterState *main_interpreter = NULL;
31639 : PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
31640 : if (!main_interpreter) {
31641 : main_interpreter = current_interpreter;
31642 : } else if (unlikely(main_interpreter != current_interpreter))
31643 : #endif
31644 : {
31645 0 : PyErr_SetString(
31646 : PyExc_ImportError,
31647 : "Interpreter change detected - this module can only be loaded into one interpreter per process.");
31648 0 : return -1;
31649 : }
31650 : return 0;
31651 : }
31652 : #if CYTHON_COMPILING_IN_LIMITED_API
31653 : static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *module, const char* from_name, const char* to_name, int allow_none)
31654 : #else
31655 12 : static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none)
31656 : #endif
31657 : {
31658 12 : PyObject *value = PyObject_GetAttrString(spec, from_name);
31659 12 : int result = 0;
31660 12 : if (likely(value)) {
31661 12 : if (allow_none || value != Py_None) {
31662 : #if CYTHON_COMPILING_IN_LIMITED_API
31663 : result = PyModule_AddObject(module, to_name, value);
31664 : #else
31665 9 : result = PyDict_SetItemString(moddict, to_name, value);
31666 : #endif
31667 : }
31668 12 : Py_DECREF(value);
31669 0 : } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
31670 0 : PyErr_Clear();
31671 : } else {
31672 : result = -1;
31673 : }
31674 12 : return result;
31675 : }
31676 3 : static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) {
31677 3 : PyObject *module = NULL, *moddict, *modname;
31678 3 : CYTHON_UNUSED_VAR(def);
31679 3 : if (__Pyx_check_single_interpreter())
31680 : return NULL;
31681 3 : if (__pyx_m)
31682 0 : return __Pyx_NewRef(__pyx_m);
31683 3 : modname = PyObject_GetAttrString(spec, "name");
31684 3 : if (unlikely(!modname)) goto bad;
31685 3 : module = PyModule_NewObject(modname);
31686 3 : Py_DECREF(modname);
31687 3 : if (unlikely(!module)) goto bad;
31688 : #if CYTHON_COMPILING_IN_LIMITED_API
31689 : moddict = module;
31690 : #else
31691 3 : moddict = PyModule_GetDict(module);
31692 3 : if (unlikely(!moddict)) goto bad;
31693 : #endif
31694 3 : if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
31695 3 : if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
31696 3 : if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
31697 3 : if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
31698 : return module;
31699 0 : bad:
31700 0 : Py_XDECREF(module);
31701 0 : return NULL;
31702 : }
31703 :
31704 :
31705 3 : static CYTHON_SMALL_CODE int __pyx_pymod_exec__sobol(PyObject *__pyx_pyinit_module)
31706 : #endif
31707 : #endif
31708 : {
31709 3 : int stringtab_initialized = 0;
31710 : #if CYTHON_USE_MODULE_STATE
31711 : int pystate_addmodule_run = 0;
31712 : #endif
31713 3 : PyObject *__pyx_t_1 = NULL;
31714 3 : PyObject *__pyx_t_2 = NULL;
31715 3 : PyObject *__pyx_t_3 = NULL;
31716 3 : PyObject *__pyx_t_4 = NULL;
31717 3 : PyObject *__pyx_t_5 = NULL;
31718 3 : int __pyx_t_6;
31719 3 : PyObject *__pyx_t_7 = NULL;
31720 3 : static PyThread_type_lock __pyx_t_8[8];
31721 3 : int __pyx_t_9;
31722 3 : int __pyx_lineno = 0;
31723 3 : const char *__pyx_filename = NULL;
31724 3 : int __pyx_clineno = 0;
31725 : __Pyx_RefNannyDeclarations
31726 : #if CYTHON_PEP489_MULTI_PHASE_INIT
31727 3 : if (__pyx_m) {
31728 0 : if (__pyx_m == __pyx_pyinit_module) return 0;
31729 0 : PyErr_SetString(PyExc_RuntimeError, "Module '_sobol' has already been imported. Re-initialisation is not supported.");
31730 0 : return -1;
31731 : }
31732 : #elif PY_MAJOR_VERSION >= 3
31733 : if (__pyx_m) return __Pyx_NewRef(__pyx_m);
31734 : #endif
31735 : /*--- Module creation code ---*/
31736 : #if CYTHON_PEP489_MULTI_PHASE_INIT
31737 3 : __pyx_m = __pyx_pyinit_module;
31738 3 : Py_INCREF(__pyx_m);
31739 : #else
31740 : #if PY_MAJOR_VERSION < 3
31741 : __pyx_m = Py_InitModule4("_sobol", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
31742 : if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
31743 : #elif CYTHON_USE_MODULE_STATE
31744 : __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
31745 : {
31746 : int add_module_result = PyState_AddModule(__pyx_t_1, &__pyx_moduledef);
31747 : __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "_sobol" pseudovariable */
31748 : if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
31749 : pystate_addmodule_run = 1;
31750 : }
31751 : #else
31752 : __pyx_m = PyModule_Create(&__pyx_moduledef);
31753 : if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
31754 : #endif
31755 : #endif
31756 3 : CYTHON_UNUSED_VAR(__pyx_t_1);
31757 3 : __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
31758 3 : Py_INCREF(__pyx_d);
31759 3 : __pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
31760 3 : __pyx_cython_runtime = __Pyx_PyImport_AddModuleRef((const char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
31761 3 : if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
31762 : #if CYTHON_REFNANNY
31763 : __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
31764 : if (!__Pyx_RefNanny) {
31765 : PyErr_Clear();
31766 : __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
31767 : if (!__Pyx_RefNanny)
31768 : Py_FatalError("failed to import 'refnanny' module");
31769 : }
31770 : #endif
31771 3 : __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit__sobol(void)", 0);
31772 3 : if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
31773 : #ifdef __Pxy_PyFrame_Initialize_Offsets
31774 : __Pxy_PyFrame_Initialize_Offsets();
31775 : #endif
31776 3 : __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
31777 3 : __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
31778 3 : __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
31779 : #ifdef __Pyx_CyFunction_USED
31780 3 : if (__pyx_CyFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
31781 : #endif
31782 : #ifdef __Pyx_FusedFunction_USED
31783 3 : if (__pyx_FusedFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
31784 : #endif
31785 : #ifdef __Pyx_Coroutine_USED
31786 : if (__pyx_Coroutine_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
31787 : #endif
31788 : #ifdef __Pyx_Generator_USED
31789 : if (__pyx_Generator_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
31790 : #endif
31791 : #ifdef __Pyx_AsyncGen_USED
31792 : if (__pyx_AsyncGen_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
31793 : #endif
31794 : #ifdef __Pyx_StopAsyncIteration_USED
31795 : if (__pyx_StopAsyncIteration_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
31796 : #endif
31797 : /*--- Library function declarations ---*/
31798 : /*--- Threads initialization code ---*/
31799 : #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
31800 : PyEval_InitThreads();
31801 : #endif
31802 : /*--- Initialize various global constants etc. ---*/
31803 3 : if (__Pyx_InitConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
31804 3 : stringtab_initialized = 1;
31805 3 : if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
31806 : #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
31807 : if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
31808 : #endif
31809 3 : if (__pyx_module_is_main_scipy__stats___sobol) {
31810 0 : if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name_2, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
31811 : }
31812 : #if PY_MAJOR_VERSION >= 3
31813 : {
31814 3 : PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
31815 3 : if (!PyDict_GetItemString(modules, "scipy.stats._sobol")) {
31816 0 : if (unlikely((PyDict_SetItemString(modules, "scipy.stats._sobol", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
31817 : }
31818 : }
31819 : #endif
31820 : /*--- Builtin init code ---*/
31821 3 : if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
31822 : /*--- Constants init code ---*/
31823 3 : if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
31824 : /*--- Global type/function init code ---*/
31825 3 : (void)__Pyx_modinit_global_init_code();
31826 3 : (void)__Pyx_modinit_variable_export_code();
31827 3 : (void)__Pyx_modinit_function_export_code();
31828 3 : if (unlikely((__Pyx_modinit_type_init_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
31829 3 : if (unlikely((__Pyx_modinit_type_import_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
31830 3 : (void)__Pyx_modinit_variable_import_code();
31831 3 : (void)__Pyx_modinit_function_import_code();
31832 : /*--- Execution code ---*/
31833 : #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
31834 : if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
31835 : #endif
31836 :
31837 : /* "View.MemoryView":99
31838 : *
31839 : * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence"
31840 : * try: # <<<<<<<<<<<<<<
31841 : * if __import__("sys").version_info >= (3, 3):
31842 : * __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
31843 : */
31844 : {
31845 3 : __Pyx_PyThreadState_declare
31846 3 : __Pyx_PyThreadState_assign
31847 3 : __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
31848 3 : __Pyx_XGOTREF(__pyx_t_1);
31849 3 : __Pyx_XGOTREF(__pyx_t_2);
31850 3 : __Pyx_XGOTREF(__pyx_t_3);
31851 : /*try:*/ {
31852 :
31853 : /* "View.MemoryView":100
31854 : * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence"
31855 : * try:
31856 : * if __import__("sys").version_info >= (3, 3): # <<<<<<<<<<<<<<
31857 : * __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
31858 : * else:
31859 : */
31860 3 : __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin___import__, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 100, __pyx_L2_error)
31861 3 : __Pyx_GOTREF(__pyx_t_4);
31862 3 : __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_version_info); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 100, __pyx_L2_error)
31863 3 : __Pyx_GOTREF(__pyx_t_5);
31864 3 : __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
31865 3 : __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_tuple__21, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 100, __pyx_L2_error)
31866 3 : __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31867 3 : __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(1, 100, __pyx_L2_error)
31868 3 : __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
31869 3 : if (__pyx_t_6) {
31870 :
31871 : /* "View.MemoryView":101
31872 : * try:
31873 : * if __import__("sys").version_info >= (3, 3):
31874 : * __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence # <<<<<<<<<<<<<<
31875 : * else:
31876 : * __pyx_collections_abc_Sequence = __import__("collections").Sequence
31877 : */
31878 3 : __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin___import__, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 101, __pyx_L2_error)
31879 3 : __Pyx_GOTREF(__pyx_t_4);
31880 3 : __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_abc); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 101, __pyx_L2_error)
31881 3 : __Pyx_GOTREF(__pyx_t_5);
31882 3 : __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
31883 3 : __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_Sequence); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 101, __pyx_L2_error)
31884 3 : __Pyx_GOTREF(__pyx_t_4);
31885 3 : __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31886 3 : __Pyx_XGOTREF(__pyx_collections_abc_Sequence);
31887 3 : __Pyx_DECREF_SET(__pyx_collections_abc_Sequence, __pyx_t_4);
31888 3 : __Pyx_GIVEREF(__pyx_t_4);
31889 3 : __pyx_t_4 = 0;
31890 :
31891 : /* "View.MemoryView":100
31892 : * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence"
31893 : * try:
31894 : * if __import__("sys").version_info >= (3, 3): # <<<<<<<<<<<<<<
31895 : * __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
31896 : * else:
31897 : */
31898 3 : goto __pyx_L8;
31899 : }
31900 :
31901 : /* "View.MemoryView":103
31902 : * __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
31903 : * else:
31904 : * __pyx_collections_abc_Sequence = __import__("collections").Sequence # <<<<<<<<<<<<<<
31905 : * except:
31906 : *
31907 : */
31908 : /*else*/ {
31909 0 : __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin___import__, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 103, __pyx_L2_error)
31910 0 : __Pyx_GOTREF(__pyx_t_4);
31911 0 : __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_Sequence); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 103, __pyx_L2_error)
31912 0 : __Pyx_GOTREF(__pyx_t_5);
31913 0 : __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
31914 0 : __Pyx_XGOTREF(__pyx_collections_abc_Sequence);
31915 0 : __Pyx_DECREF_SET(__pyx_collections_abc_Sequence, __pyx_t_5);
31916 0 : __Pyx_GIVEREF(__pyx_t_5);
31917 0 : __pyx_t_5 = 0;
31918 : }
31919 3 : __pyx_L8:;
31920 :
31921 : /* "View.MemoryView":99
31922 : *
31923 : * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence"
31924 : * try: # <<<<<<<<<<<<<<
31925 : * if __import__("sys").version_info >= (3, 3):
31926 : * __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
31927 : */
31928 : }
31929 3 : __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
31930 3 : __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
31931 3 : __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
31932 3 : goto __pyx_L7_try_end;
31933 0 : __pyx_L2_error:;
31934 0 : __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
31935 0 : __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
31936 :
31937 : /* "View.MemoryView":104
31938 : * else:
31939 : * __pyx_collections_abc_Sequence = __import__("collections").Sequence
31940 : * except: # <<<<<<<<<<<<<<
31941 : *
31942 : * __pyx_collections_abc_Sequence = None
31943 : */
31944 : /*except:*/ {
31945 0 : __Pyx_AddTraceback("View.MemoryView", __pyx_clineno, __pyx_lineno, __pyx_filename);
31946 0 : if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_7) < 0) __PYX_ERR(1, 104, __pyx_L4_except_error)
31947 0 : __Pyx_XGOTREF(__pyx_t_5);
31948 0 : __Pyx_XGOTREF(__pyx_t_4);
31949 0 : __Pyx_XGOTREF(__pyx_t_7);
31950 :
31951 : /* "View.MemoryView":106
31952 : * except:
31953 : *
31954 : * __pyx_collections_abc_Sequence = None # <<<<<<<<<<<<<<
31955 : *
31956 : *
31957 : */
31958 0 : __Pyx_INCREF(Py_None);
31959 0 : __Pyx_XGOTREF(__pyx_collections_abc_Sequence);
31960 0 : __Pyx_DECREF_SET(__pyx_collections_abc_Sequence, Py_None);
31961 0 : __Pyx_GIVEREF(Py_None);
31962 0 : __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
31963 0 : __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
31964 0 : __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
31965 0 : goto __pyx_L3_exception_handled;
31966 : }
31967 :
31968 : /* "View.MemoryView":99
31969 : *
31970 : * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence"
31971 : * try: # <<<<<<<<<<<<<<
31972 : * if __import__("sys").version_info >= (3, 3):
31973 : * __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
31974 : */
31975 0 : __pyx_L4_except_error:;
31976 0 : __Pyx_XGIVEREF(__pyx_t_1);
31977 0 : __Pyx_XGIVEREF(__pyx_t_2);
31978 0 : __Pyx_XGIVEREF(__pyx_t_3);
31979 0 : __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
31980 0 : goto __pyx_L1_error;
31981 0 : __pyx_L3_exception_handled:;
31982 0 : __Pyx_XGIVEREF(__pyx_t_1);
31983 0 : __Pyx_XGIVEREF(__pyx_t_2);
31984 0 : __Pyx_XGIVEREF(__pyx_t_3);
31985 0 : __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
31986 3 : __pyx_L7_try_end:;
31987 : }
31988 :
31989 : /* "View.MemoryView":241
31990 : *
31991 : *
31992 : * try: # <<<<<<<<<<<<<<
31993 : * count = __pyx_collections_abc_Sequence.count
31994 : * index = __pyx_collections_abc_Sequence.index
31995 : */
31996 : {
31997 3 : __Pyx_PyThreadState_declare
31998 3 : __Pyx_PyThreadState_assign
31999 3 : __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1);
32000 3 : __Pyx_XGOTREF(__pyx_t_3);
32001 3 : __Pyx_XGOTREF(__pyx_t_2);
32002 3 : __Pyx_XGOTREF(__pyx_t_1);
32003 : /*try:*/ {
32004 :
32005 : /* "View.MemoryView":242
32006 : *
32007 : * try:
32008 : * count = __pyx_collections_abc_Sequence.count # <<<<<<<<<<<<<<
32009 : * index = __pyx_collections_abc_Sequence.index
32010 : * except:
32011 : */
32012 3 : __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_n_s_count); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 242, __pyx_L11_error)
32013 3 : __Pyx_GOTREF(__pyx_t_7);
32014 3 : if (__Pyx_SetItemOnTypeDict(__pyx_array_type, __pyx_n_s_count, __pyx_t_7) < 0) __PYX_ERR(1, 242, __pyx_L11_error)
32015 3 : __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
32016 3 : PyType_Modified(__pyx_array_type);
32017 :
32018 : /* "View.MemoryView":243
32019 : * try:
32020 : * count = __pyx_collections_abc_Sequence.count
32021 : * index = __pyx_collections_abc_Sequence.index # <<<<<<<<<<<<<<
32022 : * except:
32023 : * pass
32024 : */
32025 3 : __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_n_s_index); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 243, __pyx_L11_error)
32026 3 : __Pyx_GOTREF(__pyx_t_7);
32027 3 : if (__Pyx_SetItemOnTypeDict(__pyx_array_type, __pyx_n_s_index, __pyx_t_7) < 0) __PYX_ERR(1, 243, __pyx_L11_error)
32028 3 : __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
32029 3 : PyType_Modified(__pyx_array_type);
32030 :
32031 : /* "View.MemoryView":241
32032 : *
32033 : *
32034 : * try: # <<<<<<<<<<<<<<
32035 : * count = __pyx_collections_abc_Sequence.count
32036 : * index = __pyx_collections_abc_Sequence.index
32037 : */
32038 : }
32039 3 : __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
32040 3 : __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
32041 3 : __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
32042 3 : goto __pyx_L16_try_end;
32043 0 : __pyx_L11_error:;
32044 0 : __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
32045 0 : __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
32046 0 : __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
32047 :
32048 : /* "View.MemoryView":244
32049 : * count = __pyx_collections_abc_Sequence.count
32050 : * index = __pyx_collections_abc_Sequence.index
32051 : * except: # <<<<<<<<<<<<<<
32052 : * pass
32053 : *
32054 : */
32055 : /*except:*/ {
32056 0 : __Pyx_ErrRestore(0,0,0);
32057 0 : goto __pyx_L12_exception_handled;
32058 : }
32059 0 : __pyx_L12_exception_handled:;
32060 0 : __Pyx_XGIVEREF(__pyx_t_3);
32061 0 : __Pyx_XGIVEREF(__pyx_t_2);
32062 0 : __Pyx_XGIVEREF(__pyx_t_1);
32063 0 : __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1);
32064 3 : __pyx_L16_try_end:;
32065 : }
32066 :
32067 : /* "View.MemoryView":309
32068 : * return self.name
32069 : *
32070 : * cdef generic = Enum("<strided and direct or indirect>") # <<<<<<<<<<<<<<
32071 : * cdef strided = Enum("<strided and direct>") # default
32072 : * cdef indirect = Enum("<strided and indirect>")
32073 : */
32074 3 : __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 309, __pyx_L1_error)
32075 3 : __Pyx_GOTREF(__pyx_t_7);
32076 3 : __Pyx_XGOTREF(generic);
32077 3 : __Pyx_DECREF_SET(generic, __pyx_t_7);
32078 3 : __Pyx_GIVEREF(__pyx_t_7);
32079 3 : __pyx_t_7 = 0;
32080 :
32081 : /* "View.MemoryView":310
32082 : *
32083 : * cdef generic = Enum("<strided and direct or indirect>")
32084 : * cdef strided = Enum("<strided and direct>") # default # <<<<<<<<<<<<<<
32085 : * cdef indirect = Enum("<strided and indirect>")
32086 : *
32087 : */
32088 3 : __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 310, __pyx_L1_error)
32089 3 : __Pyx_GOTREF(__pyx_t_7);
32090 3 : __Pyx_XGOTREF(strided);
32091 3 : __Pyx_DECREF_SET(strided, __pyx_t_7);
32092 3 : __Pyx_GIVEREF(__pyx_t_7);
32093 3 : __pyx_t_7 = 0;
32094 :
32095 : /* "View.MemoryView":311
32096 : * cdef generic = Enum("<strided and direct or indirect>")
32097 : * cdef strided = Enum("<strided and direct>") # default
32098 : * cdef indirect = Enum("<strided and indirect>") # <<<<<<<<<<<<<<
32099 : *
32100 : *
32101 : */
32102 3 : __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 311, __pyx_L1_error)
32103 3 : __Pyx_GOTREF(__pyx_t_7);
32104 3 : __Pyx_XGOTREF(indirect);
32105 3 : __Pyx_DECREF_SET(indirect, __pyx_t_7);
32106 3 : __Pyx_GIVEREF(__pyx_t_7);
32107 3 : __pyx_t_7 = 0;
32108 :
32109 : /* "View.MemoryView":314
32110 : *
32111 : *
32112 : * cdef contiguous = Enum("<contiguous and direct>") # <<<<<<<<<<<<<<
32113 : * cdef indirect_contiguous = Enum("<contiguous and indirect>")
32114 : *
32115 : */
32116 3 : __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 314, __pyx_L1_error)
32117 3 : __Pyx_GOTREF(__pyx_t_7);
32118 3 : __Pyx_XGOTREF(contiguous);
32119 3 : __Pyx_DECREF_SET(contiguous, __pyx_t_7);
32120 3 : __Pyx_GIVEREF(__pyx_t_7);
32121 3 : __pyx_t_7 = 0;
32122 :
32123 : /* "View.MemoryView":315
32124 : *
32125 : * cdef contiguous = Enum("<contiguous and direct>")
32126 : * cdef indirect_contiguous = Enum("<contiguous and indirect>") # <<<<<<<<<<<<<<
32127 : *
32128 : *
32129 : */
32130 3 : __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 315, __pyx_L1_error)
32131 3 : __Pyx_GOTREF(__pyx_t_7);
32132 3 : __Pyx_XGOTREF(indirect_contiguous);
32133 3 : __Pyx_DECREF_SET(indirect_contiguous, __pyx_t_7);
32134 3 : __Pyx_GIVEREF(__pyx_t_7);
32135 3 : __pyx_t_7 = 0;
32136 :
32137 : /* "View.MemoryView":323
32138 : *
32139 : *
32140 : * cdef int __pyx_memoryview_thread_locks_used = 0 # <<<<<<<<<<<<<<
32141 : * cdef PyThread_type_lock[8] __pyx_memoryview_thread_locks = [
32142 : * PyThread_allocate_lock(),
32143 : */
32144 3 : __pyx_memoryview_thread_locks_used = 0;
32145 :
32146 : /* "View.MemoryView":324
32147 : *
32148 : * cdef int __pyx_memoryview_thread_locks_used = 0
32149 : * cdef PyThread_type_lock[8] __pyx_memoryview_thread_locks = [ # <<<<<<<<<<<<<<
32150 : * PyThread_allocate_lock(),
32151 : * PyThread_allocate_lock(),
32152 : */
32153 3 : __pyx_t_8[0] = PyThread_allocate_lock();
32154 3 : __pyx_t_8[1] = PyThread_allocate_lock();
32155 3 : __pyx_t_8[2] = PyThread_allocate_lock();
32156 3 : __pyx_t_8[3] = PyThread_allocate_lock();
32157 3 : __pyx_t_8[4] = PyThread_allocate_lock();
32158 3 : __pyx_t_8[5] = PyThread_allocate_lock();
32159 3 : __pyx_t_8[6] = PyThread_allocate_lock();
32160 3 : __pyx_t_8[7] = PyThread_allocate_lock();
32161 3 : memcpy(&(__pyx_memoryview_thread_locks[0]), __pyx_t_8, sizeof(__pyx_memoryview_thread_locks[0]) * (8));
32162 :
32163 : /* "View.MemoryView":982
32164 : *
32165 : *
32166 : * try: # <<<<<<<<<<<<<<
32167 : * count = __pyx_collections_abc_Sequence.count
32168 : * index = __pyx_collections_abc_Sequence.index
32169 : */
32170 : {
32171 3 : __Pyx_PyThreadState_declare
32172 3 : __Pyx_PyThreadState_assign
32173 3 : __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
32174 3 : __Pyx_XGOTREF(__pyx_t_1);
32175 3 : __Pyx_XGOTREF(__pyx_t_2);
32176 3 : __Pyx_XGOTREF(__pyx_t_3);
32177 : /*try:*/ {
32178 :
32179 : /* "View.MemoryView":983
32180 : *
32181 : * try:
32182 : * count = __pyx_collections_abc_Sequence.count # <<<<<<<<<<<<<<
32183 : * index = __pyx_collections_abc_Sequence.index
32184 : * except:
32185 : */
32186 3 : __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_n_s_count); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 983, __pyx_L17_error)
32187 3 : __Pyx_GOTREF(__pyx_t_7);
32188 3 : if (__Pyx_SetItemOnTypeDict(__pyx_memoryviewslice_type, __pyx_n_s_count, __pyx_t_7) < 0) __PYX_ERR(1, 983, __pyx_L17_error)
32189 3 : __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
32190 3 : PyType_Modified(__pyx_memoryviewslice_type);
32191 :
32192 : /* "View.MemoryView":984
32193 : * try:
32194 : * count = __pyx_collections_abc_Sequence.count
32195 : * index = __pyx_collections_abc_Sequence.index # <<<<<<<<<<<<<<
32196 : * except:
32197 : * pass
32198 : */
32199 3 : __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_n_s_index); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 984, __pyx_L17_error)
32200 3 : __Pyx_GOTREF(__pyx_t_7);
32201 3 : if (__Pyx_SetItemOnTypeDict(__pyx_memoryviewslice_type, __pyx_n_s_index, __pyx_t_7) < 0) __PYX_ERR(1, 984, __pyx_L17_error)
32202 3 : __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
32203 3 : PyType_Modified(__pyx_memoryviewslice_type);
32204 :
32205 : /* "View.MemoryView":982
32206 : *
32207 : *
32208 : * try: # <<<<<<<<<<<<<<
32209 : * count = __pyx_collections_abc_Sequence.count
32210 : * index = __pyx_collections_abc_Sequence.index
32211 : */
32212 : }
32213 3 : __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
32214 3 : __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
32215 3 : __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
32216 3 : goto __pyx_L22_try_end;
32217 0 : __pyx_L17_error:;
32218 0 : __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
32219 0 : __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
32220 0 : __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
32221 :
32222 : /* "View.MemoryView":985
32223 : * count = __pyx_collections_abc_Sequence.count
32224 : * index = __pyx_collections_abc_Sequence.index
32225 : * except: # <<<<<<<<<<<<<<
32226 : * pass
32227 : *
32228 : */
32229 : /*except:*/ {
32230 0 : __Pyx_ErrRestore(0,0,0);
32231 0 : goto __pyx_L18_exception_handled;
32232 : }
32233 0 : __pyx_L18_exception_handled:;
32234 0 : __Pyx_XGIVEREF(__pyx_t_1);
32235 0 : __Pyx_XGIVEREF(__pyx_t_2);
32236 0 : __Pyx_XGIVEREF(__pyx_t_3);
32237 0 : __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
32238 3 : __pyx_L22_try_end:;
32239 : }
32240 :
32241 : /* "View.MemoryView":988
32242 : * pass
32243 : *
32244 : * try: # <<<<<<<<<<<<<<
32245 : * if __pyx_collections_abc_Sequence:
32246 : *
32247 : */
32248 : {
32249 3 : __Pyx_PyThreadState_declare
32250 3 : __Pyx_PyThreadState_assign
32251 3 : __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1);
32252 3 : __Pyx_XGOTREF(__pyx_t_3);
32253 3 : __Pyx_XGOTREF(__pyx_t_2);
32254 3 : __Pyx_XGOTREF(__pyx_t_1);
32255 : /*try:*/ {
32256 :
32257 : /* "View.MemoryView":989
32258 : *
32259 : * try:
32260 : * if __pyx_collections_abc_Sequence: # <<<<<<<<<<<<<<
32261 : *
32262 : *
32263 : */
32264 3 : __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_collections_abc_Sequence); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(1, 989, __pyx_L23_error)
32265 3 : if (__pyx_t_6) {
32266 :
32267 : /* "View.MemoryView":993
32268 : *
32269 : *
32270 : * __pyx_collections_abc_Sequence.register(_memoryviewslice) # <<<<<<<<<<<<<<
32271 : * __pyx_collections_abc_Sequence.register(array)
32272 : * except:
32273 : */
32274 3 : __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_n_s_register); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 993, __pyx_L23_error)
32275 3 : __Pyx_GOTREF(__pyx_t_7);
32276 3 : __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_7, ((PyObject *)__pyx_memoryviewslice_type)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 993, __pyx_L23_error)
32277 3 : __Pyx_GOTREF(__pyx_t_4);
32278 3 : __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
32279 3 : __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
32280 :
32281 : /* "View.MemoryView":994
32282 : *
32283 : * __pyx_collections_abc_Sequence.register(_memoryviewslice)
32284 : * __pyx_collections_abc_Sequence.register(array) # <<<<<<<<<<<<<<
32285 : * except:
32286 : * pass # ignore failure, it's a minor issue
32287 : */
32288 3 : __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_n_s_register); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 994, __pyx_L23_error)
32289 3 : __Pyx_GOTREF(__pyx_t_4);
32290 3 : __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_array_type)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 994, __pyx_L23_error)
32291 3 : __Pyx_GOTREF(__pyx_t_7);
32292 3 : __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
32293 6 : __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
32294 :
32295 : /* "View.MemoryView":989
32296 : *
32297 : * try:
32298 : * if __pyx_collections_abc_Sequence: # <<<<<<<<<<<<<<
32299 : *
32300 : *
32301 : */
32302 : }
32303 :
32304 : /* "View.MemoryView":988
32305 : * pass
32306 : *
32307 : * try: # <<<<<<<<<<<<<<
32308 : * if __pyx_collections_abc_Sequence:
32309 : *
32310 : */
32311 : }
32312 3 : __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
32313 3 : __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
32314 3 : __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
32315 3 : goto __pyx_L28_try_end;
32316 0 : __pyx_L23_error:;
32317 0 : __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
32318 0 : __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
32319 0 : __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
32320 :
32321 : /* "View.MemoryView":995
32322 : * __pyx_collections_abc_Sequence.register(_memoryviewslice)
32323 : * __pyx_collections_abc_Sequence.register(array)
32324 : * except: # <<<<<<<<<<<<<<
32325 : * pass # ignore failure, it's a minor issue
32326 : *
32327 : */
32328 : /*except:*/ {
32329 0 : __Pyx_ErrRestore(0,0,0);
32330 0 : goto __pyx_L24_exception_handled;
32331 : }
32332 0 : __pyx_L24_exception_handled:;
32333 0 : __Pyx_XGIVEREF(__pyx_t_3);
32334 0 : __Pyx_XGIVEREF(__pyx_t_2);
32335 0 : __Pyx_XGIVEREF(__pyx_t_1);
32336 0 : __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1);
32337 3 : __pyx_L28_try_end:;
32338 : }
32339 :
32340 : /* "(tree fragment)":1
32341 : * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
32342 : * cdef object __pyx_PickleError
32343 : * cdef object __pyx_result
32344 : */
32345 3 : __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum, NULL, __pyx_n_s_View_MemoryView); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1, __pyx_L1_error)
32346 3 : __Pyx_GOTREF(__pyx_t_7);
32347 3 : if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Enum, __pyx_t_7) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
32348 3 : __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
32349 :
32350 : /* "scipy/stats/_sobol.pyx":3
32351 : * # cython: language_level=3
32352 : * # cython: cdivision=True
32353 : * import importlib.resources # <<<<<<<<<<<<<<
32354 : *
32355 : * cimport cython
32356 : */
32357 3 : __pyx_t_7 = __Pyx_Import(__pyx_n_s_importlib_resources, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3, __pyx_L1_error)
32358 3 : __Pyx_GOTREF(__pyx_t_7);
32359 3 : if (PyDict_SetItem(__pyx_d, __pyx_n_s_importlib, __pyx_t_7) < 0) __PYX_ERR(0, 3, __pyx_L1_error)
32360 3 : __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
32361 :
32362 : /* "scipy/stats/_sobol.pyx":8
32363 : * cimport numpy as cnp
32364 : *
32365 : * import numpy as np # <<<<<<<<<<<<<<
32366 : *
32367 : * cnp.import_array()
32368 : */
32369 3 : __pyx_t_7 = __Pyx_ImportDottedModule(__pyx_n_s_numpy, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 8, __pyx_L1_error)
32370 3 : __Pyx_GOTREF(__pyx_t_7);
32371 3 : if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_7) < 0) __PYX_ERR(0, 8, __pyx_L1_error)
32372 3 : __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
32373 :
32374 : /* "scipy/stats/_sobol.pyx":10
32375 : * import numpy as np
32376 : *
32377 : * cnp.import_array() # <<<<<<<<<<<<<<
32378 : *
32379 : * # Parameters are linked to the direction numbers list.
32380 : */
32381 3 : __pyx_t_9 = __pyx_f_5numpy_import_array(); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 10, __pyx_L1_error)
32382 :
32383 : /* "scipy/stats/_sobol.pyx":33
32384 : * int MAXDEG_DEFINE # max polynomial degree
32385 : *
32386 : * _MAXDIM = MAXDIM_DEFINE # <<<<<<<<<<<<<<
32387 : * _MAXDEG = MAXDEG_DEFINE
32388 : *
32389 : */
32390 3 : __pyx_t_7 = __Pyx_PyInt_From_int(MAXDIM_DEFINE); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 33, __pyx_L1_error)
32391 3 : __Pyx_GOTREF(__pyx_t_7);
32392 3 : if (PyDict_SetItem(__pyx_d, __pyx_n_s_MAXDIM, __pyx_t_7) < 0) __PYX_ERR(0, 33, __pyx_L1_error)
32393 3 : __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
32394 :
32395 : /* "scipy/stats/_sobol.pyx":34
32396 : *
32397 : * _MAXDIM = MAXDIM_DEFINE
32398 : * _MAXDEG = MAXDEG_DEFINE # <<<<<<<<<<<<<<
32399 : *
32400 : * _poly_dict = {}
32401 : */
32402 3 : __pyx_t_7 = __Pyx_PyInt_From_int(MAXDEG_DEFINE); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 34, __pyx_L1_error)
32403 3 : __Pyx_GOTREF(__pyx_t_7);
32404 3 : if (PyDict_SetItem(__pyx_d, __pyx_n_s_MAXDEG, __pyx_t_7) < 0) __PYX_ERR(0, 34, __pyx_L1_error)
32405 3 : __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
32406 :
32407 : /* "scipy/stats/_sobol.pyx":36
32408 : * _MAXDEG = MAXDEG_DEFINE
32409 : *
32410 : * _poly_dict = {} # <<<<<<<<<<<<<<
32411 : * _vinit_dict = {}
32412 : *
32413 : */
32414 3 : __pyx_t_7 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 36, __pyx_L1_error)
32415 3 : __Pyx_GOTREF(__pyx_t_7);
32416 3 : if (PyDict_SetItem(__pyx_d, __pyx_n_s_poly_dict, __pyx_t_7) < 0) __PYX_ERR(0, 36, __pyx_L1_error)
32417 3 : __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
32418 :
32419 : /* "scipy/stats/_sobol.pyx":37
32420 : *
32421 : * _poly_dict = {}
32422 : * _vinit_dict = {} # <<<<<<<<<<<<<<
32423 : *
32424 : *
32425 : */
32426 3 : __pyx_t_7 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 37, __pyx_L1_error)
32427 3 : __Pyx_GOTREF(__pyx_t_7);
32428 3 : if (PyDict_SetItem(__pyx_d, __pyx_n_s_vinit_dict, __pyx_t_7) < 0) __PYX_ERR(0, 37, __pyx_L1_error)
32429 3 : __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
32430 :
32431 : /* "scipy/stats/_sobol.pyx":40
32432 : *
32433 : *
32434 : * def get_poly_vinit(kind, dtype): # <<<<<<<<<<<<<<
32435 : * """Initialize and cache the direction numbers.
32436 : *
32437 : */
32438 3 : __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_5scipy_5stats_6_sobol_1get_poly_vinit, 0, __pyx_n_s_get_poly_vinit, NULL, __pyx_n_s_scipy_stats__sobol, __pyx_d, ((PyObject *)__pyx_codeobj__33)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 40, __pyx_L1_error)
32439 3 : __Pyx_GOTREF(__pyx_t_7);
32440 3 : if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_poly_vinit, __pyx_t_7) < 0) __PYX_ERR(0, 40, __pyx_L1_error)
32441 3 : __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
32442 :
32443 : /* "scipy/stats/_sobol.pyx":85
32444 : *
32445 : *
32446 : * def _initialize_direction_numbers(poly, vinit, dtype): # <<<<<<<<<<<<<<
32447 : * """Load direction numbers into two arrays.
32448 : *
32449 : */
32450 3 : __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_5scipy_5stats_6_sobol_3_initialize_direction_numbers, 0, __pyx_n_s_initialize_direction_numbers, NULL, __pyx_n_s_scipy_stats__sobol, __pyx_d, ((PyObject *)__pyx_codeobj__35)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 85, __pyx_L1_error)
32451 3 : __Pyx_GOTREF(__pyx_t_7);
32452 3 : if (PyDict_SetItem(__pyx_d, __pyx_n_s_initialize_direction_numbers, __pyx_t_7) < 0) __PYX_ERR(0, 85, __pyx_L1_error)
32453 3 : __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
32454 :
32455 : /* "scipy/stats/_sobol.pyx":244
32456 : * @cython.boundscheck(False)
32457 : * @cython.wraparound(False)
32458 : * cpdef void _initialize_v( # <<<<<<<<<<<<<<
32459 : * uint_32_64[:, ::1] v, const int dim, const int bits
32460 : * ) noexcept:
32461 : */
32462 3 : __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_fuse_0__pyx_mdef_5scipy_5stats_6_sobol_19__pyx_fuse_0_initialize_v, 0, __pyx_n_s_pyx_fuse_0_initialize_v, NULL, __pyx_n_s_scipy_stats__sobol, __pyx_d, ((PyObject *)__pyx_codeobj__38)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 244, __pyx_L1_error)
32463 3 : __Pyx_GOTREF(__pyx_t_7);
32464 3 : if (PyDict_SetItem(__pyx_d, __pyx_n_s_initialize_v, __pyx_t_7) < 0) __PYX_ERR(0, 244, __pyx_L1_error)
32465 3 : __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
32466 3 : __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_fuse_1__pyx_mdef_5scipy_5stats_6_sobol_21__pyx_fuse_1_initialize_v, 0, __pyx_n_s_pyx_fuse_1_initialize_v, NULL, __pyx_n_s_scipy_stats__sobol, __pyx_d, ((PyObject *)__pyx_codeobj__39)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 244, __pyx_L1_error)
32467 3 : __Pyx_GOTREF(__pyx_t_7);
32468 3 : if (PyDict_SetItem(__pyx_d, __pyx_n_s_initialize_v, __pyx_t_7) < 0) __PYX_ERR(0, 244, __pyx_L1_error)
32469 3 : __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
32470 3 : __pyx_t_7 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 244, __pyx_L1_error)
32471 3 : __Pyx_GOTREF(__pyx_t_7);
32472 3 : __pyx_t_4 = __pyx_FusedFunction_New(&__pyx_fuse_0__pyx_mdef_5scipy_5stats_6_sobol_19__pyx_fuse_0_initialize_v, 0, __pyx_n_s_pyx_fuse_0_initialize_v, NULL, __pyx_n_s_scipy_stats__sobol, __pyx_d, ((PyObject *)__pyx_codeobj__37)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 244, __pyx_L1_error)
32473 3 : __Pyx_GOTREF(__pyx_t_4);
32474 6 : __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_empty_tuple);
32475 3 : if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_uint32_t, __pyx_t_4) < 0) __PYX_ERR(0, 244, __pyx_L1_error)
32476 3 : __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
32477 3 : __pyx_t_4 = __pyx_FusedFunction_New(&__pyx_fuse_1__pyx_mdef_5scipy_5stats_6_sobol_21__pyx_fuse_1_initialize_v, 0, __pyx_n_s_pyx_fuse_1_initialize_v, NULL, __pyx_n_s_scipy_stats__sobol, __pyx_d, ((PyObject *)__pyx_codeobj__37)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 244, __pyx_L1_error)
32478 3 : __Pyx_GOTREF(__pyx_t_4);
32479 6 : __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_empty_tuple);
32480 3 : if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_uint64_t, __pyx_t_4) < 0) __PYX_ERR(0, 244, __pyx_L1_error)
32481 3 : __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
32482 3 : __pyx_t_4 = __pyx_FusedFunction_New(&__pyx_mdef_5scipy_5stats_6_sobol_5_initialize_v, 0, __pyx_n_s_initialize_v, NULL, __pyx_n_s_scipy_stats__sobol, __pyx_d, ((PyObject *)__pyx_codeobj__37)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 244, __pyx_L1_error)
32483 3 : __Pyx_GOTREF(__pyx_t_4);
32484 3 : if (!__Pyx_CyFunction_InitDefaults(__pyx_t_4, sizeof(__pyx_defaults), 1)) __PYX_ERR(0, 244, __pyx_L1_error)
32485 3 : __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 244, __pyx_L1_error)
32486 3 : __Pyx_GOTREF(__pyx_t_5);
32487 3 : __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_t_4)->__pyx_arg__fused_sigindex = __pyx_t_5;
32488 3 : __Pyx_GIVEREF(__pyx_t_5);
32489 3 : __pyx_t_5 = 0;
32490 6 : __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_empty_tuple);
32491 3 : ((__pyx_FusedFunctionObject *) __pyx_t_4)->__signatures__ = __pyx_t_7;
32492 3 : __Pyx_GIVEREF(__pyx_t_7);
32493 3 : __pyx_t_7 = 0;
32494 3 : if (PyDict_SetItem(__pyx_d, __pyx_n_s_initialize_v, __pyx_t_4) < 0) __PYX_ERR(0, 244, __pyx_L1_error)
32495 3 : __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
32496 :
32497 : /* "scipy/stats/_sobol.pyx":298
32498 : *
32499 : *
32500 : * def _draw( # <<<<<<<<<<<<<<
32501 : * n,
32502 : * num_gen,
32503 : */
32504 3 : __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 298, __pyx_L1_error)
32505 3 : __Pyx_GOTREF(__pyx_t_4);
32506 3 : __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_fuse_0__pyx_mdef_5scipy_5stats_6_sobol_25_draw, 0, __pyx_n_s_draw, NULL, __pyx_n_s_scipy_stats__sobol, __pyx_d, ((PyObject *)__pyx_codeobj__41)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 298, __pyx_L1_error)
32507 3 : __Pyx_GOTREF(__pyx_t_7);
32508 6 : __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_empty_tuple);
32509 3 : if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_uint32_t, __pyx_t_7) < 0) __PYX_ERR(0, 298, __pyx_L1_error)
32510 3 : __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
32511 3 : __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_fuse_1__pyx_mdef_5scipy_5stats_6_sobol_27_draw, 0, __pyx_n_s_draw, NULL, __pyx_n_s_scipy_stats__sobol, __pyx_d, ((PyObject *)__pyx_codeobj__41)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 298, __pyx_L1_error)
32512 3 : __Pyx_GOTREF(__pyx_t_7);
32513 6 : __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_empty_tuple);
32514 3 : if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_uint64_t, __pyx_t_7) < 0) __PYX_ERR(0, 298, __pyx_L1_error)
32515 3 : __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
32516 3 : __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_mdef_5scipy_5stats_6_sobol_7_draw, 0, __pyx_n_s_draw, NULL, __pyx_n_s_scipy_stats__sobol, __pyx_d, ((PyObject *)__pyx_codeobj__41)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 298, __pyx_L1_error)
32517 3 : __Pyx_GOTREF(__pyx_t_7);
32518 3 : if (!__Pyx_CyFunction_InitDefaults(__pyx_t_7, sizeof(__pyx_defaults1), 1)) __PYX_ERR(0, 298, __pyx_L1_error)
32519 3 : __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 298, __pyx_L1_error)
32520 3 : __Pyx_GOTREF(__pyx_t_5);
32521 3 : __Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_t_7)->__pyx_arg__fused_sigindex = __pyx_t_5;
32522 3 : __Pyx_GIVEREF(__pyx_t_5);
32523 3 : __pyx_t_5 = 0;
32524 6 : __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_empty_tuple);
32525 3 : ((__pyx_FusedFunctionObject *) __pyx_t_7)->__signatures__ = __pyx_t_4;
32526 3 : __Pyx_GIVEREF(__pyx_t_4);
32527 3 : __pyx_t_4 = 0;
32528 3 : if (PyDict_SetItem(__pyx_d, __pyx_n_s_draw, __pyx_t_7) < 0) __PYX_ERR(0, 298, __pyx_L1_error)
32529 3 : __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
32530 :
32531 : /* "scipy/stats/_sobol.pyx":339
32532 : * @cython.boundscheck(False)
32533 : * @cython.wraparound(False)
32534 : * cpdef void _fast_forward(const uint_32_64 n, # <<<<<<<<<<<<<<
32535 : * const uint_32_64 num_gen,
32536 : * const int dim,
32537 : */
32538 3 : __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_fuse_0__pyx_mdef_5scipy_5stats_6_sobol_31__pyx_fuse_0_fast_forward, 0, __pyx_n_s_pyx_fuse_0_fast_forward, NULL, __pyx_n_s_scipy_stats__sobol, __pyx_d, ((PyObject *)__pyx_codeobj__44)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 339, __pyx_L1_error)
32539 3 : __Pyx_GOTREF(__pyx_t_7);
32540 3 : if (PyDict_SetItem(__pyx_d, __pyx_n_s_fast_forward, __pyx_t_7) < 0) __PYX_ERR(0, 339, __pyx_L1_error)
32541 3 : __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
32542 3 : __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_fuse_1__pyx_mdef_5scipy_5stats_6_sobol_33__pyx_fuse_1_fast_forward, 0, __pyx_n_s_pyx_fuse_1_fast_forward, NULL, __pyx_n_s_scipy_stats__sobol, __pyx_d, ((PyObject *)__pyx_codeobj__45)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 339, __pyx_L1_error)
32543 3 : __Pyx_GOTREF(__pyx_t_7);
32544 3 : if (PyDict_SetItem(__pyx_d, __pyx_n_s_fast_forward, __pyx_t_7) < 0) __PYX_ERR(0, 339, __pyx_L1_error)
32545 3 : __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
32546 3 : __pyx_t_7 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 339, __pyx_L1_error)
32547 3 : __Pyx_GOTREF(__pyx_t_7);
32548 3 : __pyx_t_4 = __pyx_FusedFunction_New(&__pyx_fuse_0__pyx_mdef_5scipy_5stats_6_sobol_31__pyx_fuse_0_fast_forward, 0, __pyx_n_s_pyx_fuse_0_fast_forward, NULL, __pyx_n_s_scipy_stats__sobol, __pyx_d, ((PyObject *)__pyx_codeobj__43)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 339, __pyx_L1_error)
32549 3 : __Pyx_GOTREF(__pyx_t_4);
32550 6 : __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_empty_tuple);
32551 3 : if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_uint32_t, __pyx_t_4) < 0) __PYX_ERR(0, 339, __pyx_L1_error)
32552 3 : __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
32553 3 : __pyx_t_4 = __pyx_FusedFunction_New(&__pyx_fuse_1__pyx_mdef_5scipy_5stats_6_sobol_33__pyx_fuse_1_fast_forward, 0, __pyx_n_s_pyx_fuse_1_fast_forward, NULL, __pyx_n_s_scipy_stats__sobol, __pyx_d, ((PyObject *)__pyx_codeobj__43)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 339, __pyx_L1_error)
32554 3 : __Pyx_GOTREF(__pyx_t_4);
32555 6 : __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_empty_tuple);
32556 3 : if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_uint64_t, __pyx_t_4) < 0) __PYX_ERR(0, 339, __pyx_L1_error)
32557 3 : __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
32558 3 : __pyx_t_4 = __pyx_FusedFunction_New(&__pyx_mdef_5scipy_5stats_6_sobol_9_fast_forward, 0, __pyx_n_s_fast_forward, NULL, __pyx_n_s_scipy_stats__sobol, __pyx_d, ((PyObject *)__pyx_codeobj__43)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 339, __pyx_L1_error)
32559 3 : __Pyx_GOTREF(__pyx_t_4);
32560 3 : if (!__Pyx_CyFunction_InitDefaults(__pyx_t_4, sizeof(__pyx_defaults2), 1)) __PYX_ERR(0, 339, __pyx_L1_error)
32561 3 : __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 339, __pyx_L1_error)
32562 3 : __Pyx_GOTREF(__pyx_t_5);
32563 3 : __Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_t_4)->__pyx_arg__fused_sigindex = __pyx_t_5;
32564 3 : __Pyx_GIVEREF(__pyx_t_5);
32565 3 : __pyx_t_5 = 0;
32566 6 : __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_empty_tuple);
32567 3 : ((__pyx_FusedFunctionObject *) __pyx_t_4)->__signatures__ = __pyx_t_7;
32568 3 : __Pyx_GIVEREF(__pyx_t_7);
32569 3 : __pyx_t_7 = 0;
32570 3 : if (PyDict_SetItem(__pyx_d, __pyx_n_s_fast_forward, __pyx_t_4) < 0) __PYX_ERR(0, 339, __pyx_L1_error)
32571 3 : __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
32572 :
32573 : /* "scipy/stats/_sobol.pyx":369
32574 : * @cython.boundscheck(False)
32575 : * @cython.wraparound(False)
32576 : * cpdef void _cscramble(const int dim, # <<<<<<<<<<<<<<
32577 : * const int bits,
32578 : * uint_32_64[:, :, ::1] ltm,
32579 : */
32580 3 : __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_fuse_0__pyx_mdef_5scipy_5stats_6_sobol_37__pyx_fuse_0_cscramble, 0, __pyx_n_s_pyx_fuse_0_cscramble, NULL, __pyx_n_s_scipy_stats__sobol, __pyx_d, ((PyObject *)__pyx_codeobj__48)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 369, __pyx_L1_error)
32581 3 : __Pyx_GOTREF(__pyx_t_4);
32582 3 : if (PyDict_SetItem(__pyx_d, __pyx_n_s_cscramble, __pyx_t_4) < 0) __PYX_ERR(0, 369, __pyx_L1_error)
32583 3 : __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
32584 3 : __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_fuse_1__pyx_mdef_5scipy_5stats_6_sobol_39__pyx_fuse_1_cscramble, 0, __pyx_n_s_pyx_fuse_1_cscramble, NULL, __pyx_n_s_scipy_stats__sobol, __pyx_d, ((PyObject *)__pyx_codeobj__49)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 369, __pyx_L1_error)
32585 3 : __Pyx_GOTREF(__pyx_t_4);
32586 3 : if (PyDict_SetItem(__pyx_d, __pyx_n_s_cscramble, __pyx_t_4) < 0) __PYX_ERR(0, 369, __pyx_L1_error)
32587 3 : __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
32588 3 : __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 369, __pyx_L1_error)
32589 3 : __Pyx_GOTREF(__pyx_t_4);
32590 3 : __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_fuse_0__pyx_mdef_5scipy_5stats_6_sobol_37__pyx_fuse_0_cscramble, 0, __pyx_n_s_pyx_fuse_0_cscramble, NULL, __pyx_n_s_scipy_stats__sobol, __pyx_d, ((PyObject *)__pyx_codeobj__47)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 369, __pyx_L1_error)
32591 3 : __Pyx_GOTREF(__pyx_t_7);
32592 6 : __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_empty_tuple);
32593 3 : if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_uint32_t, __pyx_t_7) < 0) __PYX_ERR(0, 369, __pyx_L1_error)
32594 3 : __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
32595 3 : __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_fuse_1__pyx_mdef_5scipy_5stats_6_sobol_39__pyx_fuse_1_cscramble, 0, __pyx_n_s_pyx_fuse_1_cscramble, NULL, __pyx_n_s_scipy_stats__sobol, __pyx_d, ((PyObject *)__pyx_codeobj__47)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 369, __pyx_L1_error)
32596 3 : __Pyx_GOTREF(__pyx_t_7);
32597 6 : __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_empty_tuple);
32598 3 : if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_uint64_t, __pyx_t_7) < 0) __PYX_ERR(0, 369, __pyx_L1_error)
32599 3 : __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
32600 3 : __pyx_t_7 = __pyx_FusedFunction_New(&__pyx_mdef_5scipy_5stats_6_sobol_11_cscramble, 0, __pyx_n_s_cscramble, NULL, __pyx_n_s_scipy_stats__sobol, __pyx_d, ((PyObject *)__pyx_codeobj__47)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 369, __pyx_L1_error)
32601 3 : __Pyx_GOTREF(__pyx_t_7);
32602 3 : if (!__Pyx_CyFunction_InitDefaults(__pyx_t_7, sizeof(__pyx_defaults3), 1)) __PYX_ERR(0, 369, __pyx_L1_error)
32603 3 : __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 369, __pyx_L1_error)
32604 3 : __Pyx_GOTREF(__pyx_t_5);
32605 3 : __Pyx_CyFunction_Defaults(__pyx_defaults3, __pyx_t_7)->__pyx_arg__fused_sigindex = __pyx_t_5;
32606 3 : __Pyx_GIVEREF(__pyx_t_5);
32607 3 : __pyx_t_5 = 0;
32608 6 : __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_empty_tuple);
32609 3 : ((__pyx_FusedFunctionObject *) __pyx_t_7)->__signatures__ = __pyx_t_4;
32610 3 : __Pyx_GIVEREF(__pyx_t_4);
32611 3 : __pyx_t_4 = 0;
32612 3 : if (PyDict_SetItem(__pyx_d, __pyx_n_s_cscramble, __pyx_t_7) < 0) __PYX_ERR(0, 369, __pyx_L1_error)
32613 3 : __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
32614 :
32615 : /* "scipy/stats/_sobol.pyx":400
32616 : * @cython.boundscheck(False)
32617 : * @cython.wraparound(False)
32618 : * cpdef void _fill_p_cumulative(const cnp.float_t[::1] p, # <<<<<<<<<<<<<<
32619 : * cnp.float_t[::1] p_cumulative) noexcept nogil:
32620 : * cdef int i
32621 : */
32622 3 : __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_5scipy_5stats_6_sobol_13_fill_p_cumulative, 0, __pyx_n_s_fill_p_cumulative, NULL, __pyx_n_s_scipy_stats__sobol, __pyx_d, ((PyObject *)__pyx_codeobj__51)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 400, __pyx_L1_error)
32623 3 : __Pyx_GOTREF(__pyx_t_7);
32624 3 : if (PyDict_SetItem(__pyx_d, __pyx_n_s_fill_p_cumulative, __pyx_t_7) < 0) __PYX_ERR(0, 400, __pyx_L1_error)
32625 3 : __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
32626 :
32627 : /* "scipy/stats/_sobol.pyx":414
32628 : * @cython.boundscheck(False)
32629 : * @cython.wraparound(False)
32630 : * cpdef void _categorize(const cnp.float_t[::1] draws, # <<<<<<<<<<<<<<
32631 : * const cnp.float_t[::1] p_cumulative,
32632 : * cnp.intp_t[::1] result) noexcept nogil:
32633 : */
32634 3 : __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_5scipy_5stats_6_sobol_15_categorize, 0, __pyx_n_s_categorize, NULL, __pyx_n_s_scipy_stats__sobol, __pyx_d, ((PyObject *)__pyx_codeobj__53)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 414, __pyx_L1_error)
32635 3 : __Pyx_GOTREF(__pyx_t_7);
32636 3 : if (PyDict_SetItem(__pyx_d, __pyx_n_s_categorize, __pyx_t_7) < 0) __PYX_ERR(0, 414, __pyx_L1_error)
32637 3 : __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
32638 :
32639 : /* "scipy/stats/_sobol.pyx":441
32640 : *
32641 : *
32642 : * def _test_find_index(p_cumulative, size, value): # <<<<<<<<<<<<<<
32643 : * # type: (np.ndarray, int, float) -> int
32644 : * """Wrapper for testing in python"""
32645 : */
32646 3 : __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_5scipy_5stats_6_sobol_17_test_find_index, 0, __pyx_n_s_test_find_index, NULL, __pyx_n_s_scipy_stats__sobol, __pyx_d, ((PyObject *)__pyx_codeobj__55)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 441, __pyx_L1_error)
32647 3 : __Pyx_GOTREF(__pyx_t_7);
32648 3 : if (PyDict_SetItem(__pyx_d, __pyx_n_s_test_find_index, __pyx_t_7) < 0) __PYX_ERR(0, 441, __pyx_L1_error)
32649 3 : __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
32650 :
32651 : /* "scipy/stats/_sobol.pyx":1
32652 : * # cython: language_level=3 # <<<<<<<<<<<<<<
32653 : * # cython: cdivision=True
32654 : * import importlib.resources
32655 : */
32656 3 : __pyx_t_7 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1, __pyx_L1_error)
32657 3 : __Pyx_GOTREF(__pyx_t_7);
32658 3 : if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_7) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
32659 3 : __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
32660 :
32661 : /*--- Wrapped vars code ---*/
32662 :
32663 3 : goto __pyx_L0;
32664 0 : __pyx_L1_error:;
32665 0 : __Pyx_XDECREF(__pyx_t_4);
32666 0 : __Pyx_XDECREF(__pyx_t_5);
32667 0 : __Pyx_XDECREF(__pyx_t_7);
32668 0 : if (__pyx_m) {
32669 0 : if (__pyx_d && stringtab_initialized) {
32670 0 : __Pyx_AddTraceback("init scipy.stats._sobol", __pyx_clineno, __pyx_lineno, __pyx_filename);
32671 : }
32672 : #if !CYTHON_USE_MODULE_STATE
32673 0 : Py_CLEAR(__pyx_m);
32674 : #else
32675 : Py_DECREF(__pyx_m);
32676 : if (pystate_addmodule_run) {
32677 : PyObject *tp, *value, *tb;
32678 : PyErr_Fetch(&tp, &value, &tb);
32679 : PyState_RemoveModule(&__pyx_moduledef);
32680 : PyErr_Restore(tp, value, tb);
32681 : }
32682 : #endif
32683 0 : } else if (!PyErr_Occurred()) {
32684 0 : PyErr_SetString(PyExc_ImportError, "init scipy.stats._sobol");
32685 : }
32686 0 : __pyx_L0:;
32687 3 : __Pyx_RefNannyFinishContext();
32688 : #if CYTHON_PEP489_MULTI_PHASE_INIT
32689 3 : return (__pyx_m != NULL) ? 0 : -1;
32690 : #elif PY_MAJOR_VERSION >= 3
32691 : return __pyx_m;
32692 : #else
32693 : return;
32694 : #endif
32695 : }
32696 : /* #### Code section: cleanup_globals ### */
32697 : /* #### Code section: cleanup_module ### */
32698 : /* #### Code section: main_method ### */
32699 : /* #### Code section: utility_code_pragmas ### */
32700 : #ifdef _MSC_VER
32701 : #pragma warning( push )
32702 : /* Warning 4127: conditional expression is constant
32703 : * Cython uses constant conditional expressions to allow in inline functions to be optimized at
32704 : * compile-time, so this warning is not useful
32705 : */
32706 : #pragma warning( disable : 4127 )
32707 : #endif
32708 :
32709 :
32710 :
32711 : /* #### Code section: utility_code_def ### */
32712 :
32713 : /* --- Runtime support code --- */
32714 : /* Refnanny */
32715 : #if CYTHON_REFNANNY
32716 : static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
32717 : PyObject *m = NULL, *p = NULL;
32718 : void *r = NULL;
32719 : m = PyImport_ImportModule(modname);
32720 : if (!m) goto end;
32721 : p = PyObject_GetAttrString(m, "RefNannyAPI");
32722 : if (!p) goto end;
32723 : r = PyLong_AsVoidPtr(p);
32724 : end:
32725 : Py_XDECREF(p);
32726 : Py_XDECREF(m);
32727 : return (__Pyx_RefNannyAPIStruct *)r;
32728 : }
32729 : #endif
32730 :
32731 : /* PyErrExceptionMatches */
32732 : #if CYTHON_FAST_THREAD_STATE
32733 0 : static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
32734 0 : Py_ssize_t i, n;
32735 0 : n = PyTuple_GET_SIZE(tuple);
32736 : #if PY_MAJOR_VERSION >= 3
32737 0 : for (i=0; i<n; i++) {
32738 0 : if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
32739 : }
32740 : #endif
32741 0 : for (i=0; i<n; i++) {
32742 0 : if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
32743 : }
32744 : return 0;
32745 : }
32746 9 : static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
32747 9 : int result;
32748 9 : PyObject *exc_type;
32749 : #if PY_VERSION_HEX >= 0x030C00A6
32750 9 : PyObject *current_exception = tstate->current_exception;
32751 9 : if (unlikely(!current_exception)) return 0;
32752 9 : exc_type = (PyObject*) Py_TYPE(current_exception);
32753 9 : if (exc_type == err) return 1;
32754 : #else
32755 : exc_type = tstate->curexc_type;
32756 : if (exc_type == err) return 1;
32757 : if (unlikely(!exc_type)) return 0;
32758 : #endif
32759 : #if CYTHON_AVOID_BORROWED_REFS
32760 : Py_INCREF(exc_type);
32761 : #endif
32762 0 : if (unlikely(PyTuple_Check(err))) {
32763 0 : result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
32764 : } else {
32765 0 : result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
32766 : }
32767 : #if CYTHON_AVOID_BORROWED_REFS
32768 : Py_DECREF(exc_type);
32769 : #endif
32770 : return result;
32771 : }
32772 : #endif
32773 :
32774 : /* PyErrFetchRestore */
32775 : #if CYTHON_FAST_THREAD_STATE
32776 9 : static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
32777 : #if PY_VERSION_HEX >= 0x030C00A6
32778 9 : PyObject *tmp_value;
32779 9 : assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value)));
32780 9 : if (value) {
32781 : #if CYTHON_COMPILING_IN_CPYTHON
32782 0 : if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb))
32783 : #endif
32784 0 : PyException_SetTraceback(value, tb);
32785 : }
32786 9 : tmp_value = tstate->current_exception;
32787 9 : tstate->current_exception = value;
32788 9 : Py_XDECREF(tmp_value);
32789 9 : Py_XDECREF(type);
32790 9 : Py_XDECREF(tb);
32791 : #else
32792 : PyObject *tmp_type, *tmp_value, *tmp_tb;
32793 : tmp_type = tstate->curexc_type;
32794 : tmp_value = tstate->curexc_value;
32795 : tmp_tb = tstate->curexc_traceback;
32796 : tstate->curexc_type = type;
32797 : tstate->curexc_value = value;
32798 : tstate->curexc_traceback = tb;
32799 : Py_XDECREF(tmp_type);
32800 : Py_XDECREF(tmp_value);
32801 : Py_XDECREF(tmp_tb);
32802 : #endif
32803 9 : }
32804 0 : static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
32805 : #if PY_VERSION_HEX >= 0x030C00A6
32806 0 : PyObject* exc_value;
32807 0 : exc_value = tstate->current_exception;
32808 0 : tstate->current_exception = 0;
32809 0 : *value = exc_value;
32810 0 : *type = NULL;
32811 0 : *tb = NULL;
32812 0 : if (exc_value) {
32813 0 : *type = (PyObject*) Py_TYPE(exc_value);
32814 0 : Py_INCREF(*type);
32815 : #if CYTHON_COMPILING_IN_CPYTHON
32816 0 : *tb = ((PyBaseExceptionObject*) exc_value)->traceback;
32817 0 : Py_XINCREF(*tb);
32818 : #else
32819 : *tb = PyException_GetTraceback(exc_value);
32820 : #endif
32821 : }
32822 : #else
32823 : *type = tstate->curexc_type;
32824 : *value = tstate->curexc_value;
32825 : *tb = tstate->curexc_traceback;
32826 : tstate->curexc_type = 0;
32827 : tstate->curexc_value = 0;
32828 : tstate->curexc_traceback = 0;
32829 : #endif
32830 0 : }
32831 : #endif
32832 :
32833 : /* PyObjectGetAttrStr */
32834 : #if CYTHON_USE_TYPE_SLOTS
32835 6135 : static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
32836 6135 : PyTypeObject* tp = Py_TYPE(obj);
32837 6135 : if (likely(tp->tp_getattro))
32838 6135 : return tp->tp_getattro(obj, attr_name);
32839 : #if PY_MAJOR_VERSION < 3
32840 : if (likely(tp->tp_getattr))
32841 : return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
32842 : #endif
32843 0 : return PyObject_GetAttr(obj, attr_name);
32844 : }
32845 : #endif
32846 :
32847 : /* PyObjectGetAttrStrNoError */
32848 : #if __PYX_LIMITED_VERSION_HEX < 0x030d00A1
32849 9 : static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
32850 9 : __Pyx_PyThreadState_declare
32851 9 : __Pyx_PyThreadState_assign
32852 9 : if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
32853 9 : __Pyx_PyErr_Clear();
32854 9 : }
32855 : #endif
32856 81 : static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
32857 81 : PyObject *result;
32858 : #if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1
32859 : (void) PyObject_GetOptionalAttr(obj, attr_name, &result);
32860 : return result;
32861 : #else
32862 : #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1
32863 81 : PyTypeObject* tp = Py_TYPE(obj);
32864 81 : if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
32865 9 : return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
32866 : }
32867 : #endif
32868 72 : result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
32869 72 : if (unlikely(!result)) {
32870 9 : __Pyx_PyObject_GetAttrStr_ClearAttributeError();
32871 : }
32872 : return result;
32873 : #endif
32874 : }
32875 :
32876 : /* GetBuiltinName */
32877 33 : static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
32878 33 : PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_b, name);
32879 33 : if (unlikely(!result) && !PyErr_Occurred()) {
32880 0 : PyErr_Format(PyExc_NameError,
32881 : #if PY_MAJOR_VERSION >= 3
32882 : "name '%U' is not defined", name);
32883 : #else
32884 : "name '%.200s' is not defined", PyString_AS_STRING(name));
32885 : #endif
32886 : }
32887 33 : return result;
32888 : }
32889 :
32890 : /* TupleAndListFromArray */
32891 : #if CYTHON_COMPILING_IN_CPYTHON
32892 : static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) {
32893 : PyObject *v;
32894 : Py_ssize_t i;
32895 : for (i = 0; i < length; i++) {
32896 : v = dest[i] = src[i];
32897 : Py_INCREF(v);
32898 : }
32899 : }
32900 : static CYTHON_INLINE PyObject *
32901 : __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n)
32902 : {
32903 : PyObject *res;
32904 : if (n <= 0) {
32905 : Py_INCREF(__pyx_empty_tuple);
32906 : return __pyx_empty_tuple;
32907 : }
32908 : res = PyTuple_New(n);
32909 : if (unlikely(res == NULL)) return NULL;
32910 : __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n);
32911 : return res;
32912 : }
32913 : static CYTHON_INLINE PyObject *
32914 : __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n)
32915 : {
32916 : PyObject *res;
32917 : if (n <= 0) {
32918 : return PyList_New(0);
32919 : }
32920 : res = PyList_New(n);
32921 : if (unlikely(res == NULL)) return NULL;
32922 : __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n);
32923 : return res;
32924 : }
32925 : #endif
32926 :
32927 : /* BytesEquals */
32928 : static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
32929 : #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API
32930 : return PyObject_RichCompareBool(s1, s2, equals);
32931 : #else
32932 : if (s1 == s2) {
32933 : return (equals == Py_EQ);
32934 : } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
32935 : const char *ps1, *ps2;
32936 : Py_ssize_t length = PyBytes_GET_SIZE(s1);
32937 : if (length != PyBytes_GET_SIZE(s2))
32938 : return (equals == Py_NE);
32939 : ps1 = PyBytes_AS_STRING(s1);
32940 : ps2 = PyBytes_AS_STRING(s2);
32941 : if (ps1[0] != ps2[0]) {
32942 : return (equals == Py_NE);
32943 : } else if (length == 1) {
32944 : return (equals == Py_EQ);
32945 : } else {
32946 : int result;
32947 : #if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000)
32948 : Py_hash_t hash1, hash2;
32949 : hash1 = ((PyBytesObject*)s1)->ob_shash;
32950 : hash2 = ((PyBytesObject*)s2)->ob_shash;
32951 : if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
32952 : return (equals == Py_NE);
32953 : }
32954 : #endif
32955 : result = memcmp(ps1, ps2, (size_t)length);
32956 : return (equals == Py_EQ) ? (result == 0) : (result != 0);
32957 : }
32958 : } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
32959 : return (equals == Py_NE);
32960 : } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
32961 : return (equals == Py_NE);
32962 : } else {
32963 : int result;
32964 : PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
32965 : if (!py_result)
32966 : return -1;
32967 : result = __Pyx_PyObject_IsTrue(py_result);
32968 : Py_DECREF(py_result);
32969 : return result;
32970 : }
32971 : #endif
32972 : }
32973 :
32974 : /* UnicodeEquals */
32975 792 : static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
32976 : #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API
32977 : return PyObject_RichCompareBool(s1, s2, equals);
32978 : #else
32979 : #if PY_MAJOR_VERSION < 3
32980 : PyObject* owned_ref = NULL;
32981 : #endif
32982 792 : int s1_is_unicode, s2_is_unicode;
32983 792 : if (s1 == s2) {
32984 398 : goto return_eq;
32985 : }
32986 394 : s1_is_unicode = PyUnicode_CheckExact(s1);
32987 394 : s2_is_unicode = PyUnicode_CheckExact(s2);
32988 : #if PY_MAJOR_VERSION < 3
32989 : if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
32990 : owned_ref = PyUnicode_FromObject(s2);
32991 : if (unlikely(!owned_ref))
32992 : return -1;
32993 : s2 = owned_ref;
32994 : s2_is_unicode = 1;
32995 : } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
32996 : owned_ref = PyUnicode_FromObject(s1);
32997 : if (unlikely(!owned_ref))
32998 : return -1;
32999 : s1 = owned_ref;
33000 : s1_is_unicode = 1;
33001 : } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
33002 : return __Pyx_PyBytes_Equals(s1, s2, equals);
33003 : }
33004 : #endif
33005 394 : if (s1_is_unicode & s2_is_unicode) {
33006 394 : Py_ssize_t length;
33007 394 : int kind;
33008 394 : void *data1, *data2;
33009 394 : if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
33010 : return -1;
33011 394 : length = __Pyx_PyUnicode_GET_LENGTH(s1);
33012 394 : if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
33013 394 : goto return_ne;
33014 : }
33015 : #if CYTHON_USE_UNICODE_INTERNALS
33016 : {
33017 0 : Py_hash_t hash1, hash2;
33018 : #if CYTHON_PEP393_ENABLED
33019 0 : hash1 = ((PyASCIIObject*)s1)->hash;
33020 0 : hash2 = ((PyASCIIObject*)s2)->hash;
33021 : #else
33022 : hash1 = ((PyUnicodeObject*)s1)->hash;
33023 : hash2 = ((PyUnicodeObject*)s2)->hash;
33024 : #endif
33025 0 : if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
33026 0 : goto return_ne;
33027 : }
33028 : }
33029 : #endif
33030 0 : kind = __Pyx_PyUnicode_KIND(s1);
33031 0 : if (kind != __Pyx_PyUnicode_KIND(s2)) {
33032 0 : goto return_ne;
33033 : }
33034 0 : data1 = __Pyx_PyUnicode_DATA(s1);
33035 0 : data2 = __Pyx_PyUnicode_DATA(s2);
33036 0 : if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
33037 0 : goto return_ne;
33038 0 : } else if (length == 1) {
33039 0 : goto return_eq;
33040 : } else {
33041 0 : int result = memcmp(data1, data2, (size_t)(length * kind));
33042 : #if PY_MAJOR_VERSION < 3
33043 : Py_XDECREF(owned_ref);
33044 : #endif
33045 0 : return (equals == Py_EQ) ? (result == 0) : (result != 0);
33046 : }
33047 0 : } else if ((s1 == Py_None) & s2_is_unicode) {
33048 0 : goto return_ne;
33049 0 : } else if ((s2 == Py_None) & s1_is_unicode) {
33050 0 : goto return_ne;
33051 : } else {
33052 0 : int result;
33053 0 : PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
33054 : #if PY_MAJOR_VERSION < 3
33055 : Py_XDECREF(owned_ref);
33056 : #endif
33057 0 : if (!py_result)
33058 : return -1;
33059 0 : result = __Pyx_PyObject_IsTrue(py_result);
33060 0 : Py_DECREF(py_result);
33061 0 : return result;
33062 : }
33063 398 : return_eq:
33064 : #if PY_MAJOR_VERSION < 3
33065 : Py_XDECREF(owned_ref);
33066 : #endif
33067 398 : return (equals == Py_EQ);
33068 394 : return_ne:
33069 : #if PY_MAJOR_VERSION < 3
33070 : Py_XDECREF(owned_ref);
33071 : #endif
33072 394 : return (equals == Py_NE);
33073 : #endif
33074 : }
33075 :
33076 : /* fastcall */
33077 : #if CYTHON_METH_FASTCALL
33078 0 : static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s)
33079 : {
33080 0 : Py_ssize_t i, n = PyTuple_GET_SIZE(kwnames);
33081 0 : for (i = 0; i < n; i++)
33082 : {
33083 0 : if (s == PyTuple_GET_ITEM(kwnames, i)) return kwvalues[i];
33084 : }
33085 0 : for (i = 0; i < n; i++)
33086 : {
33087 0 : int eq = __Pyx_PyUnicode_Equals(s, PyTuple_GET_ITEM(kwnames, i), Py_EQ);
33088 0 : if (unlikely(eq != 0)) {
33089 0 : if (unlikely(eq < 0)) return NULL;
33090 0 : return kwvalues[i];
33091 : }
33092 : }
33093 : return NULL;
33094 : }
33095 : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
33096 : CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) {
33097 : Py_ssize_t i, nkwargs = PyTuple_GET_SIZE(kwnames);
33098 : PyObject *dict;
33099 : dict = PyDict_New();
33100 : if (unlikely(!dict))
33101 : return NULL;
33102 : for (i=0; i<nkwargs; i++) {
33103 : PyObject *key = PyTuple_GET_ITEM(kwnames, i);
33104 : if (unlikely(PyDict_SetItem(dict, key, kwvalues[i]) < 0))
33105 : goto bad;
33106 : }
33107 : return dict;
33108 : bad:
33109 : Py_DECREF(dict);
33110 : return NULL;
33111 : }
33112 : #endif
33113 : #endif
33114 :
33115 : /* RaiseArgTupleInvalid */
33116 0 : static void __Pyx_RaiseArgtupleInvalid(
33117 : const char* func_name,
33118 : int exact,
33119 : Py_ssize_t num_min,
33120 : Py_ssize_t num_max,
33121 : Py_ssize_t num_found)
33122 : {
33123 0 : Py_ssize_t num_expected;
33124 0 : const char *more_or_less;
33125 0 : if (num_found < num_min) {
33126 : num_expected = num_min;
33127 : more_or_less = "at least";
33128 : } else {
33129 0 : num_expected = num_max;
33130 0 : more_or_less = "at most";
33131 : }
33132 0 : if (exact) {
33133 0 : more_or_less = "exactly";
33134 : }
33135 0 : PyErr_Format(PyExc_TypeError,
33136 : "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
33137 : func_name, more_or_less, num_expected,
33138 : (num_expected == 1) ? "" : "s", num_found);
33139 0 : }
33140 :
33141 : /* RaiseDoubleKeywords */
33142 0 : static void __Pyx_RaiseDoubleKeywordsError(
33143 : const char* func_name,
33144 : PyObject* kw_name)
33145 : {
33146 0 : PyErr_Format(PyExc_TypeError,
33147 : #if PY_MAJOR_VERSION >= 3
33148 : "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
33149 : #else
33150 : "%s() got multiple values for keyword argument '%s'", func_name,
33151 : PyString_AsString(kw_name));
33152 : #endif
33153 : }
33154 :
33155 : /* ParseKeywords */
33156 0 : static int __Pyx_ParseOptionalKeywords(
33157 : PyObject *kwds,
33158 : PyObject *const *kwvalues,
33159 : PyObject **argnames[],
33160 : PyObject *kwds2,
33161 : PyObject *values[],
33162 : Py_ssize_t num_pos_args,
33163 : const char* function_name)
33164 : {
33165 0 : PyObject *key = 0, *value = 0;
33166 0 : Py_ssize_t pos = 0;
33167 0 : PyObject*** name;
33168 0 : PyObject*** first_kw_arg = argnames + num_pos_args;
33169 0 : int kwds_is_tuple = CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds));
33170 0 : while (1) {
33171 0 : Py_XDECREF(key); key = NULL;
33172 0 : Py_XDECREF(value); value = NULL;
33173 0 : if (kwds_is_tuple) {
33174 0 : Py_ssize_t size;
33175 : #if CYTHON_ASSUME_SAFE_MACROS
33176 0 : size = PyTuple_GET_SIZE(kwds);
33177 : #else
33178 : size = PyTuple_Size(kwds);
33179 : if (size < 0) goto bad;
33180 : #endif
33181 0 : if (pos >= size) break;
33182 : #if CYTHON_AVOID_BORROWED_REFS
33183 : key = __Pyx_PySequence_ITEM(kwds, pos);
33184 : if (!key) goto bad;
33185 : #elif CYTHON_ASSUME_SAFE_MACROS
33186 0 : key = PyTuple_GET_ITEM(kwds, pos);
33187 : #else
33188 : key = PyTuple_GetItem(kwds, pos);
33189 : if (!key) goto bad;
33190 : #endif
33191 0 : value = kwvalues[pos];
33192 0 : pos++;
33193 : }
33194 : else
33195 : {
33196 0 : if (!PyDict_Next(kwds, &pos, &key, &value)) break;
33197 : #if CYTHON_AVOID_BORROWED_REFS
33198 : Py_INCREF(key);
33199 : #endif
33200 : }
33201 0 : name = first_kw_arg;
33202 0 : while (*name && (**name != key)) name++;
33203 0 : if (*name) {
33204 0 : values[name-argnames] = value;
33205 : #if CYTHON_AVOID_BORROWED_REFS
33206 : Py_INCREF(value);
33207 : Py_DECREF(key);
33208 : #endif
33209 0 : key = NULL;
33210 0 : value = NULL;
33211 0 : continue;
33212 : }
33213 : #if !CYTHON_AVOID_BORROWED_REFS
33214 0 : Py_INCREF(key);
33215 : #endif
33216 0 : Py_INCREF(value);
33217 0 : name = first_kw_arg;
33218 : #if PY_MAJOR_VERSION < 3
33219 : if (likely(PyString_Check(key))) {
33220 : while (*name) {
33221 : if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
33222 : && _PyString_Eq(**name, key)) {
33223 : values[name-argnames] = value;
33224 : #if CYTHON_AVOID_BORROWED_REFS
33225 : value = NULL;
33226 : #endif
33227 : break;
33228 : }
33229 : name++;
33230 : }
33231 : if (*name) continue;
33232 : else {
33233 : PyObject*** argname = argnames;
33234 : while (argname != first_kw_arg) {
33235 : if ((**argname == key) || (
33236 : (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
33237 : && _PyString_Eq(**argname, key))) {
33238 : goto arg_passed_twice;
33239 : }
33240 : argname++;
33241 : }
33242 : }
33243 : } else
33244 : #endif
33245 0 : if (likely(PyUnicode_Check(key))) {
33246 0 : while (*name) {
33247 0 : int cmp = (
33248 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
33249 0 : (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
33250 : #endif
33251 0 : PyUnicode_Compare(**name, key)
33252 : );
33253 0 : if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
33254 0 : if (cmp == 0) {
33255 0 : values[name-argnames] = value;
33256 : #if CYTHON_AVOID_BORROWED_REFS
33257 : value = NULL;
33258 : #endif
33259 0 : break;
33260 : }
33261 0 : name++;
33262 : }
33263 0 : if (*name) continue;
33264 : else {
33265 : PyObject*** argname = argnames;
33266 0 : while (argname != first_kw_arg) {
33267 0 : int cmp = (**argname == key) ? 0 :
33268 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
33269 0 : (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
33270 : #endif
33271 0 : PyUnicode_Compare(**argname, key);
33272 0 : if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
33273 0 : if (cmp == 0) goto arg_passed_twice;
33274 0 : argname++;
33275 : }
33276 : }
33277 : } else
33278 0 : goto invalid_keyword_type;
33279 0 : if (kwds2) {
33280 0 : if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
33281 : } else {
33282 0 : goto invalid_keyword;
33283 : }
33284 : }
33285 0 : Py_XDECREF(key);
33286 0 : Py_XDECREF(value);
33287 0 : return 0;
33288 0 : arg_passed_twice:
33289 0 : __Pyx_RaiseDoubleKeywordsError(function_name, key);
33290 0 : goto bad;
33291 0 : invalid_keyword_type:
33292 0 : PyErr_Format(PyExc_TypeError,
33293 : "%.200s() keywords must be strings", function_name);
33294 0 : goto bad;
33295 0 : invalid_keyword:
33296 : #if PY_MAJOR_VERSION < 3
33297 : PyErr_Format(PyExc_TypeError,
33298 : "%.200s() got an unexpected keyword argument '%.200s'",
33299 : function_name, PyString_AsString(key));
33300 : #else
33301 0 : PyErr_Format(PyExc_TypeError,
33302 : "%s() got an unexpected keyword argument '%U'",
33303 : function_name, key);
33304 : #endif
33305 0 : bad:
33306 0 : Py_XDECREF(key);
33307 0 : Py_XDECREF(value);
33308 0 : return -1;
33309 : }
33310 :
33311 : /* ArgTypeTest */
33312 0 : static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
33313 : {
33314 0 : __Pyx_TypeName type_name;
33315 0 : __Pyx_TypeName obj_type_name;
33316 0 : if (unlikely(!type)) {
33317 0 : PyErr_SetString(PyExc_SystemError, "Missing type object");
33318 0 : return 0;
33319 : }
33320 0 : else if (exact) {
33321 : #if PY_MAJOR_VERSION == 2
33322 : if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
33323 : #endif
33324 : }
33325 : else {
33326 0 : if (likely(__Pyx_TypeCheck(obj, type))) return 1;
33327 : }
33328 0 : type_name = __Pyx_PyType_GetName(type);
33329 0 : obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
33330 0 : PyErr_Format(PyExc_TypeError,
33331 : "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME
33332 : ", got " __Pyx_FMT_TYPENAME ")", name, type_name, obj_type_name);
33333 0 : __Pyx_DECREF_TypeName(type_name);
33334 0 : __Pyx_DECREF_TypeName(obj_type_name);
33335 0 : return 0;
33336 : }
33337 :
33338 : /* RaiseException */
33339 : #if PY_MAJOR_VERSION < 3
33340 : static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
33341 : __Pyx_PyThreadState_declare
33342 : CYTHON_UNUSED_VAR(cause);
33343 : Py_XINCREF(type);
33344 : if (!value || value == Py_None)
33345 : value = NULL;
33346 : else
33347 : Py_INCREF(value);
33348 : if (!tb || tb == Py_None)
33349 : tb = NULL;
33350 : else {
33351 : Py_INCREF(tb);
33352 : if (!PyTraceBack_Check(tb)) {
33353 : PyErr_SetString(PyExc_TypeError,
33354 : "raise: arg 3 must be a traceback or None");
33355 : goto raise_error;
33356 : }
33357 : }
33358 : if (PyType_Check(type)) {
33359 : #if CYTHON_COMPILING_IN_PYPY
33360 : if (!value) {
33361 : Py_INCREF(Py_None);
33362 : value = Py_None;
33363 : }
33364 : #endif
33365 : PyErr_NormalizeException(&type, &value, &tb);
33366 : } else {
33367 : if (value) {
33368 : PyErr_SetString(PyExc_TypeError,
33369 : "instance exception may not have a separate value");
33370 : goto raise_error;
33371 : }
33372 : value = type;
33373 : type = (PyObject*) Py_TYPE(type);
33374 : Py_INCREF(type);
33375 : if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
33376 : PyErr_SetString(PyExc_TypeError,
33377 : "raise: exception class must be a subclass of BaseException");
33378 : goto raise_error;
33379 : }
33380 : }
33381 : __Pyx_PyThreadState_assign
33382 : __Pyx_ErrRestore(type, value, tb);
33383 : return;
33384 : raise_error:
33385 : Py_XDECREF(value);
33386 : Py_XDECREF(type);
33387 : Py_XDECREF(tb);
33388 : return;
33389 : }
33390 : #else
33391 0 : static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
33392 0 : PyObject* owned_instance = NULL;
33393 0 : if (tb == Py_None) {
33394 : tb = 0;
33395 0 : } else if (tb && !PyTraceBack_Check(tb)) {
33396 0 : PyErr_SetString(PyExc_TypeError,
33397 : "raise: arg 3 must be a traceback or None");
33398 0 : goto bad;
33399 : }
33400 0 : if (value == Py_None)
33401 0 : value = 0;
33402 0 : if (PyExceptionInstance_Check(type)) {
33403 0 : if (value) {
33404 0 : PyErr_SetString(PyExc_TypeError,
33405 : "instance exception may not have a separate value");
33406 0 : goto bad;
33407 : }
33408 : value = type;
33409 : type = (PyObject*) Py_TYPE(value);
33410 0 : } else if (PyExceptionClass_Check(type)) {
33411 0 : PyObject *instance_class = NULL;
33412 0 : if (value && PyExceptionInstance_Check(value)) {
33413 0 : instance_class = (PyObject*) Py_TYPE(value);
33414 0 : if (instance_class != type) {
33415 0 : int is_subclass = PyObject_IsSubclass(instance_class, type);
33416 0 : if (!is_subclass) {
33417 : instance_class = NULL;
33418 0 : } else if (unlikely(is_subclass == -1)) {
33419 0 : goto bad;
33420 : } else {
33421 : type = instance_class;
33422 : }
33423 : }
33424 : }
33425 : if (!instance_class) {
33426 0 : PyObject *args;
33427 0 : if (!value)
33428 0 : args = PyTuple_New(0);
33429 0 : else if (PyTuple_Check(value)) {
33430 0 : Py_INCREF(value);
33431 0 : args = value;
33432 : } else
33433 0 : args = PyTuple_Pack(1, value);
33434 0 : if (!args)
33435 0 : goto bad;
33436 0 : owned_instance = PyObject_Call(type, args, NULL);
33437 0 : Py_DECREF(args);
33438 0 : if (!owned_instance)
33439 0 : goto bad;
33440 0 : value = owned_instance;
33441 0 : if (!PyExceptionInstance_Check(value)) {
33442 0 : PyErr_Format(PyExc_TypeError,
33443 : "calling %R should have returned an instance of "
33444 : "BaseException, not %R",
33445 : type, Py_TYPE(value));
33446 0 : goto bad;
33447 : }
33448 : }
33449 : } else {
33450 0 : PyErr_SetString(PyExc_TypeError,
33451 : "raise: exception class must be a subclass of BaseException");
33452 0 : goto bad;
33453 : }
33454 0 : if (cause) {
33455 0 : PyObject *fixed_cause;
33456 0 : if (cause == Py_None) {
33457 : fixed_cause = NULL;
33458 0 : } else if (PyExceptionClass_Check(cause)) {
33459 0 : fixed_cause = PyObject_CallObject(cause, NULL);
33460 0 : if (fixed_cause == NULL)
33461 0 : goto bad;
33462 0 : } else if (PyExceptionInstance_Check(cause)) {
33463 0 : fixed_cause = cause;
33464 0 : Py_INCREF(fixed_cause);
33465 : } else {
33466 0 : PyErr_SetString(PyExc_TypeError,
33467 : "exception causes must derive from "
33468 : "BaseException");
33469 0 : goto bad;
33470 : }
33471 0 : PyException_SetCause(value, fixed_cause);
33472 : }
33473 0 : PyErr_SetObject(type, value);
33474 0 : if (tb) {
33475 : #if PY_VERSION_HEX >= 0x030C00A6
33476 0 : PyException_SetTraceback(value, tb);
33477 : #elif CYTHON_FAST_THREAD_STATE
33478 : PyThreadState *tstate = __Pyx_PyThreadState_Current;
33479 : PyObject* tmp_tb = tstate->curexc_traceback;
33480 : if (tb != tmp_tb) {
33481 : Py_INCREF(tb);
33482 : tstate->curexc_traceback = tb;
33483 : Py_XDECREF(tmp_tb);
33484 : }
33485 : #else
33486 : PyObject *tmp_type, *tmp_value, *tmp_tb;
33487 : PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
33488 : Py_INCREF(tb);
33489 : PyErr_Restore(tmp_type, tmp_value, tb);
33490 : Py_XDECREF(tmp_tb);
33491 : #endif
33492 : }
33493 0 : bad:
33494 0 : Py_XDECREF(owned_instance);
33495 0 : return;
33496 : }
33497 : #endif
33498 :
33499 : /* PyFunctionFastCall */
33500 : #if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL
33501 : static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
33502 : PyObject *globals) {
33503 : PyFrameObject *f;
33504 : PyThreadState *tstate = __Pyx_PyThreadState_Current;
33505 : PyObject **fastlocals;
33506 : Py_ssize_t i;
33507 : PyObject *result;
33508 : assert(globals != NULL);
33509 : /* XXX Perhaps we should create a specialized
33510 : PyFrame_New() that doesn't take locals, but does
33511 : take builtins without sanity checking them.
33512 : */
33513 : assert(tstate != NULL);
33514 : f = PyFrame_New(tstate, co, globals, NULL);
33515 : if (f == NULL) {
33516 : return NULL;
33517 : }
33518 : fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
33519 : for (i = 0; i < na; i++) {
33520 : Py_INCREF(*args);
33521 : fastlocals[i] = *args++;
33522 : }
33523 : result = PyEval_EvalFrameEx(f,0);
33524 : ++tstate->recursion_depth;
33525 : Py_DECREF(f);
33526 : --tstate->recursion_depth;
33527 : return result;
33528 : }
33529 : static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
33530 : PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
33531 : PyObject *globals = PyFunction_GET_GLOBALS(func);
33532 : PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
33533 : PyObject *closure;
33534 : #if PY_MAJOR_VERSION >= 3
33535 : PyObject *kwdefs;
33536 : #endif
33537 : PyObject *kwtuple, **k;
33538 : PyObject **d;
33539 : Py_ssize_t nd;
33540 : Py_ssize_t nk;
33541 : PyObject *result;
33542 : assert(kwargs == NULL || PyDict_Check(kwargs));
33543 : nk = kwargs ? PyDict_Size(kwargs) : 0;
33544 : #if PY_MAJOR_VERSION < 3
33545 : if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) {
33546 : return NULL;
33547 : }
33548 : #else
33549 : if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) {
33550 : return NULL;
33551 : }
33552 : #endif
33553 : if (
33554 : #if PY_MAJOR_VERSION >= 3
33555 : co->co_kwonlyargcount == 0 &&
33556 : #endif
33557 : likely(kwargs == NULL || nk == 0) &&
33558 : co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
33559 : if (argdefs == NULL && co->co_argcount == nargs) {
33560 : result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
33561 : goto done;
33562 : }
33563 : else if (nargs == 0 && argdefs != NULL
33564 : && co->co_argcount == Py_SIZE(argdefs)) {
33565 : /* function called with no arguments, but all parameters have
33566 : a default value: use default values as arguments .*/
33567 : args = &PyTuple_GET_ITEM(argdefs, 0);
33568 : result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
33569 : goto done;
33570 : }
33571 : }
33572 : if (kwargs != NULL) {
33573 : Py_ssize_t pos, i;
33574 : kwtuple = PyTuple_New(2 * nk);
33575 : if (kwtuple == NULL) {
33576 : result = NULL;
33577 : goto done;
33578 : }
33579 : k = &PyTuple_GET_ITEM(kwtuple, 0);
33580 : pos = i = 0;
33581 : while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
33582 : Py_INCREF(k[i]);
33583 : Py_INCREF(k[i+1]);
33584 : i += 2;
33585 : }
33586 : nk = i / 2;
33587 : }
33588 : else {
33589 : kwtuple = NULL;
33590 : k = NULL;
33591 : }
33592 : closure = PyFunction_GET_CLOSURE(func);
33593 : #if PY_MAJOR_VERSION >= 3
33594 : kwdefs = PyFunction_GET_KW_DEFAULTS(func);
33595 : #endif
33596 : if (argdefs != NULL) {
33597 : d = &PyTuple_GET_ITEM(argdefs, 0);
33598 : nd = Py_SIZE(argdefs);
33599 : }
33600 : else {
33601 : d = NULL;
33602 : nd = 0;
33603 : }
33604 : #if PY_MAJOR_VERSION >= 3
33605 : result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
33606 : args, (int)nargs,
33607 : k, (int)nk,
33608 : d, (int)nd, kwdefs, closure);
33609 : #else
33610 : result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
33611 : args, (int)nargs,
33612 : k, (int)nk,
33613 : d, (int)nd, closure);
33614 : #endif
33615 : Py_XDECREF(kwtuple);
33616 : done:
33617 : Py_LeaveRecursiveCall();
33618 : return result;
33619 : }
33620 : #endif
33621 :
33622 : /* PyObjectCall */
33623 : #if CYTHON_COMPILING_IN_CPYTHON
33624 3090 : static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
33625 3090 : PyObject *result;
33626 3090 : ternaryfunc call = Py_TYPE(func)->tp_call;
33627 3090 : if (unlikely(!call))
33628 0 : return PyObject_Call(func, arg, kw);
33629 : #if PY_MAJOR_VERSION < 3
33630 : if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
33631 : return NULL;
33632 : #else
33633 3090 : if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
33634 : return NULL;
33635 : #endif
33636 3090 : result = (*call)(func, arg, kw);
33637 3090 : Py_LeaveRecursiveCall();
33638 3090 : if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
33639 0 : PyErr_SetString(
33640 : PyExc_SystemError,
33641 : "NULL result without error in PyObject_Call");
33642 : }
33643 : return result;
33644 : }
33645 : #endif
33646 :
33647 : /* PyObjectCallMethO */
33648 : #if CYTHON_COMPILING_IN_CPYTHON
33649 0 : static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
33650 0 : PyObject *self, *result;
33651 0 : PyCFunction cfunc;
33652 0 : cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func);
33653 0 : self = __Pyx_CyOrPyCFunction_GET_SELF(func);
33654 : #if PY_MAJOR_VERSION < 3
33655 : if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
33656 : return NULL;
33657 : #else
33658 0 : if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
33659 : return NULL;
33660 : #endif
33661 0 : result = cfunc(self, arg);
33662 0 : Py_LeaveRecursiveCall();
33663 0 : if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
33664 0 : PyErr_SetString(
33665 : PyExc_SystemError,
33666 : "NULL result without error in PyObject_Call");
33667 : }
33668 : return result;
33669 : }
33670 : #endif
33671 :
33672 : /* PyObjectFastCall */
33673 : #if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API
33674 : static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs) {
33675 : PyObject *argstuple;
33676 : PyObject *result = 0;
33677 : size_t i;
33678 : argstuple = PyTuple_New((Py_ssize_t)nargs);
33679 : if (unlikely(!argstuple)) return NULL;
33680 : for (i = 0; i < nargs; i++) {
33681 : Py_INCREF(args[i]);
33682 : if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) < 0) goto bad;
33683 : }
33684 : result = __Pyx_PyObject_Call(func, argstuple, kwargs);
33685 : bad:
33686 : Py_DECREF(argstuple);
33687 : return result;
33688 : }
33689 : #endif
33690 1654 : static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t _nargs, PyObject *kwargs) {
33691 1654 : Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs);
33692 : #if CYTHON_COMPILING_IN_CPYTHON
33693 1654 : if (nargs == 0 && kwargs == NULL) {
33694 0 : if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS))
33695 0 : return __Pyx_PyObject_CallMethO(func, NULL);
33696 : }
33697 1654 : else if (nargs == 1 && kwargs == NULL) {
33698 858 : if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O))
33699 0 : return __Pyx_PyObject_CallMethO(func, args[0]);
33700 : }
33701 : #endif
33702 : #if PY_VERSION_HEX < 0x030800B1
33703 : #if CYTHON_FAST_PYCCALL
33704 : if (PyCFunction_Check(func)) {
33705 : if (kwargs) {
33706 : return _PyCFunction_FastCallDict(func, args, nargs, kwargs);
33707 : } else {
33708 : return _PyCFunction_FastCallKeywords(func, args, nargs, NULL);
33709 : }
33710 : }
33711 : #if PY_VERSION_HEX >= 0x030700A1
33712 : if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) {
33713 : return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL);
33714 : }
33715 : #endif
33716 : #endif
33717 : #if CYTHON_FAST_PYCALL
33718 : if (PyFunction_Check(func)) {
33719 : return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs);
33720 : }
33721 : #endif
33722 : #endif
33723 1654 : if (kwargs == NULL) {
33724 : #if CYTHON_VECTORCALL
33725 : #if PY_VERSION_HEX < 0x03090000
33726 : vectorcallfunc f = _PyVectorcall_Function(func);
33727 : #else
33728 1654 : vectorcallfunc f = PyVectorcall_Function(func);
33729 : #endif
33730 1654 : if (f) {
33731 1654 : return f(func, args, (size_t)nargs, NULL);
33732 : }
33733 : #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL
33734 : if (__Pyx_CyFunction_CheckExact(func)) {
33735 : __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func);
33736 : if (f) return f(func, args, (size_t)nargs, NULL);
33737 : }
33738 : #endif
33739 : }
33740 0 : if (nargs == 0) {
33741 0 : return __Pyx_PyObject_Call(func, __pyx_empty_tuple, kwargs);
33742 : }
33743 : #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API
33744 0 : return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs);
33745 : #else
33746 : return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs);
33747 : #endif
33748 : }
33749 :
33750 : /* RaiseUnexpectedTypeError */
33751 : static int
33752 0 : __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj)
33753 : {
33754 0 : __Pyx_TypeName obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
33755 0 : PyErr_Format(PyExc_TypeError, "Expected %s, got " __Pyx_FMT_TYPENAME,
33756 : expected, obj_type_name);
33757 0 : __Pyx_DECREF_TypeName(obj_type_name);
33758 0 : return 0;
33759 : }
33760 :
33761 : /* CIntToDigits */
33762 : static const char DIGIT_PAIRS_10[2*10*10+1] = {
33763 : "00010203040506070809"
33764 : "10111213141516171819"
33765 : "20212223242526272829"
33766 : "30313233343536373839"
33767 : "40414243444546474849"
33768 : "50515253545556575859"
33769 : "60616263646566676869"
33770 : "70717273747576777879"
33771 : "80818283848586878889"
33772 : "90919293949596979899"
33773 : };
33774 : static const char DIGIT_PAIRS_8[2*8*8+1] = {
33775 : "0001020304050607"
33776 : "1011121314151617"
33777 : "2021222324252627"
33778 : "3031323334353637"
33779 : "4041424344454647"
33780 : "5051525354555657"
33781 : "6061626364656667"
33782 : "7071727374757677"
33783 : };
33784 : static const char DIGITS_HEX[2*16+1] = {
33785 : "0123456789abcdef"
33786 : "0123456789ABCDEF"
33787 : };
33788 :
33789 : /* BuildPyUnicode */
33790 0 : static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, char* chars, int clength,
33791 : int prepend_sign, char padding_char) {
33792 0 : PyObject *uval;
33793 0 : Py_ssize_t uoffset = ulength - clength;
33794 : #if CYTHON_USE_UNICODE_INTERNALS
33795 0 : Py_ssize_t i;
33796 : #if CYTHON_PEP393_ENABLED
33797 0 : void *udata;
33798 0 : uval = PyUnicode_New(ulength, 127);
33799 0 : if (unlikely(!uval)) return NULL;
33800 0 : udata = PyUnicode_DATA(uval);
33801 : #else
33802 : Py_UNICODE *udata;
33803 : uval = PyUnicode_FromUnicode(NULL, ulength);
33804 : if (unlikely(!uval)) return NULL;
33805 : udata = PyUnicode_AS_UNICODE(uval);
33806 : #endif
33807 0 : if (uoffset > 0) {
33808 0 : i = 0;
33809 0 : if (prepend_sign) {
33810 0 : __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, 0, '-');
33811 0 : i++;
33812 : }
33813 0 : for (; i < uoffset; i++) {
33814 0 : __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, i, padding_char);
33815 : }
33816 : }
33817 0 : for (i=0; i < clength; i++) {
33818 0 : __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, uoffset+i, chars[i]);
33819 : }
33820 : #else
33821 : {
33822 : PyObject *sign = NULL, *padding = NULL;
33823 : uval = NULL;
33824 : if (uoffset > 0) {
33825 : prepend_sign = !!prepend_sign;
33826 : if (uoffset > prepend_sign) {
33827 : padding = PyUnicode_FromOrdinal(padding_char);
33828 : if (likely(padding) && uoffset > prepend_sign + 1) {
33829 : PyObject *tmp;
33830 : PyObject *repeat = PyInt_FromSsize_t(uoffset - prepend_sign);
33831 : if (unlikely(!repeat)) goto done_or_error;
33832 : tmp = PyNumber_Multiply(padding, repeat);
33833 : Py_DECREF(repeat);
33834 : Py_DECREF(padding);
33835 : padding = tmp;
33836 : }
33837 : if (unlikely(!padding)) goto done_or_error;
33838 : }
33839 : if (prepend_sign) {
33840 : sign = PyUnicode_FromOrdinal('-');
33841 : if (unlikely(!sign)) goto done_or_error;
33842 : }
33843 : }
33844 : uval = PyUnicode_DecodeASCII(chars, clength, NULL);
33845 : if (likely(uval) && padding) {
33846 : PyObject *tmp = PyNumber_Add(padding, uval);
33847 : Py_DECREF(uval);
33848 : uval = tmp;
33849 : }
33850 : if (likely(uval) && sign) {
33851 : PyObject *tmp = PyNumber_Add(sign, uval);
33852 : Py_DECREF(uval);
33853 : uval = tmp;
33854 : }
33855 : done_or_error:
33856 : Py_XDECREF(padding);
33857 : Py_XDECREF(sign);
33858 : }
33859 : #endif
33860 : return uval;
33861 : }
33862 :
33863 : /* CIntToPyUnicode */
33864 0 : static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char) {
33865 0 : char digits[sizeof(int)*3+2];
33866 0 : char *dpos, *end = digits + sizeof(int)*3+2;
33867 0 : const char *hex_digits = DIGITS_HEX;
33868 0 : Py_ssize_t length, ulength;
33869 0 : int prepend_sign, last_one_off;
33870 0 : int remaining;
33871 : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
33872 : #pragma GCC diagnostic push
33873 : #pragma GCC diagnostic ignored "-Wconversion"
33874 : #endif
33875 0 : const int neg_one = (int) -1, const_zero = (int) 0;
33876 : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
33877 : #pragma GCC diagnostic pop
33878 : #endif
33879 0 : const int is_unsigned = neg_one > const_zero;
33880 0 : if (format_char == 'X') {
33881 0 : hex_digits += 16;
33882 0 : format_char = 'x';
33883 : }
33884 0 : remaining = value;
33885 0 : last_one_off = 0;
33886 0 : dpos = end;
33887 0 : do {
33888 0 : int digit_pos;
33889 0 : switch (format_char) {
33890 0 : case 'o':
33891 0 : digit_pos = abs((int)(remaining % (8*8)));
33892 0 : remaining = (int) (remaining / (8*8));
33893 0 : dpos -= 2;
33894 0 : memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2);
33895 0 : last_one_off = (digit_pos < 8);
33896 0 : break;
33897 0 : case 'd':
33898 0 : digit_pos = abs((int)(remaining % (10*10)));
33899 0 : remaining = (int) (remaining / (10*10));
33900 0 : dpos -= 2;
33901 0 : memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2);
33902 0 : last_one_off = (digit_pos < 10);
33903 0 : break;
33904 0 : case 'x':
33905 0 : *(--dpos) = hex_digits[abs((int)(remaining % 16))];
33906 0 : remaining = (int) (remaining / 16);
33907 0 : break;
33908 : default:
33909 : assert(0);
33910 : break;
33911 : }
33912 0 : } while (unlikely(remaining != 0));
33913 0 : assert(!last_one_off || *dpos == '0');
33914 0 : dpos += last_one_off;
33915 0 : length = end - dpos;
33916 0 : ulength = length;
33917 0 : prepend_sign = 0;
33918 0 : if (!is_unsigned && value <= neg_one) {
33919 0 : if (padding_char == ' ' || width <= length + 1) {
33920 0 : *(--dpos) = '-';
33921 0 : ++length;
33922 : } else {
33923 : prepend_sign = 1;
33924 : }
33925 0 : ++ulength;
33926 : }
33927 0 : if (width > ulength) {
33928 : ulength = width;
33929 : }
33930 0 : if (ulength == 1) {
33931 0 : return PyUnicode_FromOrdinal(*dpos);
33932 : }
33933 0 : return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char);
33934 : }
33935 :
33936 : /* CIntToPyUnicode */
33937 0 : static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char) {
33938 0 : char digits[sizeof(Py_ssize_t)*3+2];
33939 0 : char *dpos, *end = digits + sizeof(Py_ssize_t)*3+2;
33940 0 : const char *hex_digits = DIGITS_HEX;
33941 0 : Py_ssize_t length, ulength;
33942 0 : int prepend_sign, last_one_off;
33943 0 : Py_ssize_t remaining;
33944 : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
33945 : #pragma GCC diagnostic push
33946 : #pragma GCC diagnostic ignored "-Wconversion"
33947 : #endif
33948 0 : const Py_ssize_t neg_one = (Py_ssize_t) -1, const_zero = (Py_ssize_t) 0;
33949 : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
33950 : #pragma GCC diagnostic pop
33951 : #endif
33952 0 : const int is_unsigned = neg_one > const_zero;
33953 0 : if (format_char == 'X') {
33954 0 : hex_digits += 16;
33955 0 : format_char = 'x';
33956 : }
33957 0 : remaining = value;
33958 0 : last_one_off = 0;
33959 0 : dpos = end;
33960 0 : do {
33961 0 : int digit_pos;
33962 0 : switch (format_char) {
33963 0 : case 'o':
33964 0 : digit_pos = abs((int)(remaining % (8*8)));
33965 0 : remaining = (Py_ssize_t) (remaining / (8*8));
33966 0 : dpos -= 2;
33967 0 : memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2);
33968 0 : last_one_off = (digit_pos < 8);
33969 0 : break;
33970 0 : case 'd':
33971 0 : digit_pos = abs((int)(remaining % (10*10)));
33972 0 : remaining = (Py_ssize_t) (remaining / (10*10));
33973 0 : dpos -= 2;
33974 0 : memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2);
33975 0 : last_one_off = (digit_pos < 10);
33976 0 : break;
33977 0 : case 'x':
33978 0 : *(--dpos) = hex_digits[abs((int)(remaining % 16))];
33979 0 : remaining = (Py_ssize_t) (remaining / 16);
33980 0 : break;
33981 : default:
33982 : assert(0);
33983 : break;
33984 : }
33985 0 : } while (unlikely(remaining != 0));
33986 0 : assert(!last_one_off || *dpos == '0');
33987 0 : dpos += last_one_off;
33988 0 : length = end - dpos;
33989 0 : ulength = length;
33990 0 : prepend_sign = 0;
33991 0 : if (!is_unsigned && value <= neg_one) {
33992 0 : if (padding_char == ' ' || width <= length + 1) {
33993 0 : *(--dpos) = '-';
33994 0 : ++length;
33995 : } else {
33996 : prepend_sign = 1;
33997 : }
33998 0 : ++ulength;
33999 : }
34000 0 : if (width > ulength) {
34001 : ulength = width;
34002 : }
34003 0 : if (ulength == 1) {
34004 0 : return PyUnicode_FromOrdinal(*dpos);
34005 : }
34006 0 : return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char);
34007 : }
34008 :
34009 : /* JoinPyUnicode */
34010 0 : static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength,
34011 : Py_UCS4 max_char) {
34012 : #if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
34013 0 : PyObject *result_uval;
34014 0 : int result_ukind, kind_shift;
34015 0 : Py_ssize_t i, char_pos;
34016 0 : void *result_udata;
34017 0 : CYTHON_MAYBE_UNUSED_VAR(max_char);
34018 : #if CYTHON_PEP393_ENABLED
34019 0 : result_uval = PyUnicode_New(result_ulength, max_char);
34020 0 : if (unlikely(!result_uval)) return NULL;
34021 0 : result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND;
34022 0 : kind_shift = (result_ukind == PyUnicode_4BYTE_KIND) ? 2 : result_ukind - 1;
34023 0 : result_udata = PyUnicode_DATA(result_uval);
34024 : #else
34025 : result_uval = PyUnicode_FromUnicode(NULL, result_ulength);
34026 : if (unlikely(!result_uval)) return NULL;
34027 : result_ukind = sizeof(Py_UNICODE);
34028 : kind_shift = (result_ukind == 4) ? 2 : result_ukind - 1;
34029 : result_udata = PyUnicode_AS_UNICODE(result_uval);
34030 : #endif
34031 0 : assert(kind_shift == 2 || kind_shift == 1 || kind_shift == 0);
34032 0 : char_pos = 0;
34033 0 : for (i=0; i < value_count; i++) {
34034 0 : int ukind;
34035 0 : Py_ssize_t ulength;
34036 0 : void *udata;
34037 0 : PyObject *uval = PyTuple_GET_ITEM(value_tuple, i);
34038 0 : if (unlikely(__Pyx_PyUnicode_READY(uval)))
34039 : goto bad;
34040 0 : ulength = __Pyx_PyUnicode_GET_LENGTH(uval);
34041 0 : if (unlikely(!ulength))
34042 0 : continue;
34043 0 : if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - ulength < char_pos))
34044 0 : goto overflow;
34045 0 : ukind = __Pyx_PyUnicode_KIND(uval);
34046 0 : udata = __Pyx_PyUnicode_DATA(uval);
34047 0 : if (!CYTHON_PEP393_ENABLED || ukind == result_ukind) {
34048 0 : memcpy((char *)result_udata + (char_pos << kind_shift), udata, (size_t) (ulength << kind_shift));
34049 : } else {
34050 : #if PY_VERSION_HEX >= 0x030d0000
34051 : if (unlikely(PyUnicode_CopyCharacters(result_uval, char_pos, uval, 0, ulength) < 0)) goto bad;
34052 : #elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030300F0 || defined(_PyUnicode_FastCopyCharacters)
34053 0 : _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength);
34054 : #else
34055 : Py_ssize_t j;
34056 : for (j=0; j < ulength; j++) {
34057 : Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j);
34058 : __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar);
34059 : }
34060 : #endif
34061 : }
34062 0 : char_pos += ulength;
34063 : }
34064 : return result_uval;
34065 0 : overflow:
34066 0 : PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string");
34067 0 : bad:
34068 0 : Py_DECREF(result_uval);
34069 : return NULL;
34070 : #else
34071 : CYTHON_UNUSED_VAR(max_char);
34072 : CYTHON_UNUSED_VAR(result_ulength);
34073 : CYTHON_UNUSED_VAR(value_count);
34074 : return PyUnicode_Join(__pyx_empty_unicode, value_tuple);
34075 : #endif
34076 : }
34077 :
34078 : /* GetAttr */
34079 0 : static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
34080 : #if CYTHON_USE_TYPE_SLOTS
34081 : #if PY_MAJOR_VERSION >= 3
34082 0 : if (likely(PyUnicode_Check(n)))
34083 : #else
34084 : if (likely(PyString_Check(n)))
34085 : #endif
34086 0 : return __Pyx_PyObject_GetAttrStr(o, n);
34087 : #endif
34088 0 : return PyObject_GetAttr(o, n);
34089 : }
34090 :
34091 : /* GetItemInt */
34092 0 : static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
34093 0 : PyObject *r;
34094 0 : if (unlikely(!j)) return NULL;
34095 0 : r = PyObject_GetItem(o, j);
34096 0 : Py_DECREF(j);
34097 : return r;
34098 : }
34099 445 : static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
34100 : CYTHON_NCP_UNUSED int wraparound,
34101 : CYTHON_NCP_UNUSED int boundscheck) {
34102 : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
34103 445 : Py_ssize_t wrapped_i = i;
34104 445 : if (wraparound & unlikely(i < 0)) {
34105 0 : wrapped_i += PyList_GET_SIZE(o);
34106 : }
34107 445 : if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
34108 445 : PyObject *r = PyList_GET_ITEM(o, wrapped_i);
34109 445 : Py_INCREF(r);
34110 445 : return r;
34111 : }
34112 0 : return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
34113 : #else
34114 : return PySequence_GetItem(o, i);
34115 : #endif
34116 : }
34117 0 : static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
34118 : CYTHON_NCP_UNUSED int wraparound,
34119 : CYTHON_NCP_UNUSED int boundscheck) {
34120 : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
34121 0 : Py_ssize_t wrapped_i = i;
34122 0 : if (wraparound & unlikely(i < 0)) {
34123 0 : wrapped_i += PyTuple_GET_SIZE(o);
34124 : }
34125 0 : if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
34126 0 : PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
34127 0 : Py_INCREF(r);
34128 0 : return r;
34129 : }
34130 0 : return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
34131 : #else
34132 : return PySequence_GetItem(o, i);
34133 : #endif
34134 : }
34135 0 : static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
34136 : CYTHON_NCP_UNUSED int wraparound,
34137 : CYTHON_NCP_UNUSED int boundscheck) {
34138 : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
34139 0 : if (is_list || PyList_CheckExact(o)) {
34140 0 : Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
34141 0 : if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
34142 0 : PyObject *r = PyList_GET_ITEM(o, n);
34143 0 : Py_INCREF(r);
34144 0 : return r;
34145 : }
34146 : }
34147 0 : else if (PyTuple_CheckExact(o)) {
34148 0 : Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
34149 0 : if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
34150 0 : PyObject *r = PyTuple_GET_ITEM(o, n);
34151 0 : Py_INCREF(r);
34152 0 : return r;
34153 : }
34154 : } else {
34155 0 : PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping;
34156 0 : PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence;
34157 0 : if (mm && mm->mp_subscript) {
34158 0 : PyObject *r, *key = PyInt_FromSsize_t(i);
34159 0 : if (unlikely(!key)) return NULL;
34160 0 : r = mm->mp_subscript(o, key);
34161 0 : Py_DECREF(key);
34162 0 : return r;
34163 : }
34164 0 : if (likely(sm && sm->sq_item)) {
34165 0 : if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) {
34166 0 : Py_ssize_t l = sm->sq_length(o);
34167 0 : if (likely(l >= 0)) {
34168 0 : i += l;
34169 : } else {
34170 0 : if (!PyErr_ExceptionMatches(PyExc_OverflowError))
34171 : return NULL;
34172 0 : PyErr_Clear();
34173 : }
34174 : }
34175 0 : return sm->sq_item(o, i);
34176 : }
34177 : }
34178 : #else
34179 : if (is_list || !PyMapping_Check(o)) {
34180 : return PySequence_GetItem(o, i);
34181 : }
34182 : #endif
34183 0 : return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
34184 : }
34185 :
34186 : /* PyObjectCallOneArg */
34187 6 : static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
34188 6 : PyObject *args[2] = {NULL, arg};
34189 6 : return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
34190 : }
34191 :
34192 : /* ObjectGetItem */
34193 : #if CYTHON_USE_TYPE_SLOTS
34194 0 : static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject *index) {
34195 0 : PyObject *runerr = NULL;
34196 0 : Py_ssize_t key_value;
34197 0 : key_value = __Pyx_PyIndex_AsSsize_t(index);
34198 0 : if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
34199 0 : return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1);
34200 : }
34201 0 : if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
34202 0 : __Pyx_TypeName index_type_name = __Pyx_PyType_GetName(Py_TYPE(index));
34203 0 : PyErr_Clear();
34204 0 : PyErr_Format(PyExc_IndexError,
34205 : "cannot fit '" __Pyx_FMT_TYPENAME "' into an index-sized integer", index_type_name);
34206 : __Pyx_DECREF_TypeName(index_type_name);
34207 : }
34208 : return NULL;
34209 : }
34210 0 : static PyObject *__Pyx_PyObject_GetItem_Slow(PyObject *obj, PyObject *key) {
34211 0 : __Pyx_TypeName obj_type_name;
34212 0 : if (likely(PyType_Check(obj))) {
34213 0 : PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(obj, __pyx_n_s_class_getitem);
34214 0 : if (!meth) {
34215 0 : PyErr_Clear();
34216 : } else {
34217 0 : PyObject *result = __Pyx_PyObject_CallOneArg(meth, key);
34218 0 : Py_DECREF(meth);
34219 0 : return result;
34220 : }
34221 : }
34222 0 : obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
34223 0 : PyErr_Format(PyExc_TypeError,
34224 : "'" __Pyx_FMT_TYPENAME "' object is not subscriptable", obj_type_name);
34225 0 : __Pyx_DECREF_TypeName(obj_type_name);
34226 0 : return NULL;
34227 : }
34228 0 : static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key) {
34229 0 : PyTypeObject *tp = Py_TYPE(obj);
34230 0 : PyMappingMethods *mm = tp->tp_as_mapping;
34231 0 : PySequenceMethods *sm = tp->tp_as_sequence;
34232 0 : if (likely(mm && mm->mp_subscript)) {
34233 0 : return mm->mp_subscript(obj, key);
34234 : }
34235 0 : if (likely(sm && sm->sq_item)) {
34236 0 : return __Pyx_PyObject_GetIndex(obj, key);
34237 : }
34238 0 : return __Pyx_PyObject_GetItem_Slow(obj, key);
34239 : }
34240 : #endif
34241 :
34242 : /* KeywordStringCheck */
34243 0 : static int __Pyx_CheckKeywordStrings(
34244 : PyObject *kw,
34245 : const char* function_name,
34246 : int kw_allowed)
34247 : {
34248 0 : PyObject* key = 0;
34249 0 : Py_ssize_t pos = 0;
34250 : #if CYTHON_COMPILING_IN_PYPY
34251 : if (!kw_allowed && PyDict_Next(kw, &pos, &key, 0))
34252 : goto invalid_keyword;
34253 : return 1;
34254 : #else
34255 0 : if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kw))) {
34256 0 : Py_ssize_t kwsize;
34257 : #if CYTHON_ASSUME_SAFE_MACROS
34258 0 : kwsize = PyTuple_GET_SIZE(kw);
34259 : #else
34260 : kwsize = PyTuple_Size(kw);
34261 : if (kwsize < 0) return 0;
34262 : #endif
34263 0 : if (unlikely(kwsize == 0))
34264 : return 1;
34265 0 : if (!kw_allowed) {
34266 : #if CYTHON_ASSUME_SAFE_MACROS
34267 0 : key = PyTuple_GET_ITEM(kw, 0);
34268 : #else
34269 : key = PyTuple_GetItem(kw, pos);
34270 : if (!key) return 0;
34271 : #endif
34272 0 : goto invalid_keyword;
34273 : }
34274 : #if PY_VERSION_HEX < 0x03090000
34275 : for (pos = 0; pos < kwsize; pos++) {
34276 : #if CYTHON_ASSUME_SAFE_MACROS
34277 : key = PyTuple_GET_ITEM(kw, pos);
34278 : #else
34279 : key = PyTuple_GetItem(kw, pos);
34280 : if (!key) return 0;
34281 : #endif
34282 : if (unlikely(!PyUnicode_Check(key)))
34283 : goto invalid_keyword_type;
34284 : }
34285 : #endif
34286 : return 1;
34287 : }
34288 0 : while (PyDict_Next(kw, &pos, &key, 0)) {
34289 : #if PY_MAJOR_VERSION < 3
34290 : if (unlikely(!PyString_Check(key)))
34291 : #endif
34292 0 : if (unlikely(!PyUnicode_Check(key)))
34293 0 : goto invalid_keyword_type;
34294 : }
34295 0 : if (!kw_allowed && unlikely(key))
34296 0 : goto invalid_keyword;
34297 : return 1;
34298 0 : invalid_keyword_type:
34299 0 : PyErr_Format(PyExc_TypeError,
34300 : "%.200s() keywords must be strings", function_name);
34301 0 : return 0;
34302 : #endif
34303 0 : invalid_keyword:
34304 : #if PY_MAJOR_VERSION < 3
34305 : PyErr_Format(PyExc_TypeError,
34306 : "%.200s() got an unexpected keyword argument '%.200s'",
34307 : function_name, PyString_AsString(key));
34308 : #else
34309 0 : PyErr_Format(PyExc_TypeError,
34310 : "%s() got an unexpected keyword argument '%U'",
34311 : function_name, key);
34312 : #endif
34313 0 : return 0;
34314 : }
34315 :
34316 : /* DivInt[Py_ssize_t] */
34317 0 : static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) {
34318 0 : Py_ssize_t q = a / b;
34319 0 : Py_ssize_t r = a - q*b;
34320 0 : q -= ((r != 0) & ((r ^ b) < 0));
34321 0 : return q;
34322 : }
34323 :
34324 : /* GetAttr3 */
34325 : #if __PYX_LIMITED_VERSION_HEX < 0x030d00A1
34326 0 : static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
34327 0 : __Pyx_PyThreadState_declare
34328 0 : __Pyx_PyThreadState_assign
34329 0 : if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
34330 : return NULL;
34331 0 : __Pyx_PyErr_Clear();
34332 0 : Py_INCREF(d);
34333 : return d;
34334 : }
34335 : #endif
34336 0 : static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
34337 0 : PyObject *r;
34338 : #if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1
34339 : int res = PyObject_GetOptionalAttr(o, n, &r);
34340 : return (res != 0) ? r : __Pyx_NewRef(d);
34341 : #else
34342 : #if CYTHON_USE_TYPE_SLOTS
34343 0 : if (likely(PyString_Check(n))) {
34344 0 : r = __Pyx_PyObject_GetAttrStrNoError(o, n);
34345 0 : if (unlikely(!r) && likely(!PyErr_Occurred())) {
34346 0 : r = __Pyx_NewRef(d);
34347 : }
34348 0 : return r;
34349 : }
34350 : #endif
34351 0 : r = PyObject_GetAttr(o, n);
34352 0 : return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
34353 : #endif
34354 : }
34355 :
34356 : /* PyDictVersioning */
34357 : #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
34358 : static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
34359 : PyObject *dict = Py_TYPE(obj)->tp_dict;
34360 : return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
34361 : }
34362 : static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
34363 : PyObject **dictptr = NULL;
34364 : Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
34365 : if (offset) {
34366 : #if CYTHON_COMPILING_IN_CPYTHON
34367 : dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
34368 : #else
34369 : dictptr = _PyObject_GetDictPtr(obj);
34370 : #endif
34371 : }
34372 : return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
34373 : }
34374 : static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
34375 : PyObject *dict = Py_TYPE(obj)->tp_dict;
34376 : if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
34377 : return 0;
34378 : return obj_dict_version == __Pyx_get_object_dict_version(obj);
34379 : }
34380 : #endif
34381 :
34382 : /* GetModuleGlobalName */
34383 : #if CYTHON_USE_DICT_VERSIONS
34384 : static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
34385 : #else
34386 2400 : static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
34387 : #endif
34388 : {
34389 2400 : PyObject *result;
34390 : #if !CYTHON_AVOID_BORROWED_REFS
34391 : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && PY_VERSION_HEX < 0x030d0000
34392 2400 : result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
34393 : __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
34394 2400 : if (likely(result)) {
34395 4800 : return __Pyx_NewRef(result);
34396 0 : } else if (unlikely(PyErr_Occurred())) {
34397 : return NULL;
34398 : }
34399 : #elif CYTHON_COMPILING_IN_LIMITED_API
34400 : if (unlikely(!__pyx_m)) {
34401 : return NULL;
34402 : }
34403 : result = PyObject_GetAttr(__pyx_m, name);
34404 : if (likely(result)) {
34405 : return result;
34406 : }
34407 : #else
34408 : result = PyDict_GetItem(__pyx_d, name);
34409 : __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
34410 : if (likely(result)) {
34411 : return __Pyx_NewRef(result);
34412 : }
34413 : #endif
34414 : #else
34415 : result = PyObject_GetItem(__pyx_d, name);
34416 : __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
34417 : if (likely(result)) {
34418 : return __Pyx_NewRef(result);
34419 : }
34420 : PyErr_Clear();
34421 : #endif
34422 0 : return __Pyx_GetBuiltinName(name);
34423 : }
34424 :
34425 : /* RaiseTooManyValuesToUnpack */
34426 0 : static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
34427 0 : PyErr_Format(PyExc_ValueError,
34428 : "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
34429 0 : }
34430 :
34431 : /* RaiseNeedMoreValuesToUnpack */
34432 0 : static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
34433 0 : PyErr_Format(PyExc_ValueError,
34434 : "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
34435 : index, (index == 1) ? "" : "s");
34436 0 : }
34437 :
34438 : /* RaiseNoneIterError */
34439 0 : static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
34440 0 : PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
34441 0 : }
34442 :
34443 : /* ExtTypeTest */
34444 0 : static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
34445 0 : __Pyx_TypeName obj_type_name;
34446 0 : __Pyx_TypeName type_name;
34447 0 : if (unlikely(!type)) {
34448 0 : PyErr_SetString(PyExc_SystemError, "Missing type object");
34449 0 : return 0;
34450 : }
34451 0 : if (likely(__Pyx_TypeCheck(obj, type)))
34452 : return 1;
34453 0 : obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
34454 0 : type_name = __Pyx_PyType_GetName(type);
34455 0 : PyErr_Format(PyExc_TypeError,
34456 : "Cannot convert " __Pyx_FMT_TYPENAME " to " __Pyx_FMT_TYPENAME,
34457 : obj_type_name, type_name);
34458 0 : __Pyx_DECREF_TypeName(obj_type_name);
34459 0 : __Pyx_DECREF_TypeName(type_name);
34460 0 : return 0;
34461 : }
34462 :
34463 : /* GetTopmostException */
34464 : #if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
34465 : static _PyErr_StackItem *
34466 19 : __Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
34467 : {
34468 19 : _PyErr_StackItem *exc_info = tstate->exc_info;
34469 91 : while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) &&
34470 91 : exc_info->previous_item != NULL)
34471 : {
34472 : exc_info = exc_info->previous_item;
34473 : }
34474 19 : return exc_info;
34475 : }
34476 : #endif
34477 :
34478 : /* SaveResetException */
34479 : #if CYTHON_FAST_THREAD_STATE
34480 19 : static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
34481 : #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
34482 19 : _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
34483 19 : PyObject *exc_value = exc_info->exc_value;
34484 19 : if (exc_value == NULL || exc_value == Py_None) {
34485 19 : *value = NULL;
34486 19 : *type = NULL;
34487 19 : *tb = NULL;
34488 : } else {
34489 0 : *value = exc_value;
34490 0 : Py_INCREF(*value);
34491 0 : *type = (PyObject*) Py_TYPE(exc_value);
34492 0 : Py_INCREF(*type);
34493 0 : *tb = PyException_GetTraceback(exc_value);
34494 : }
34495 : #elif CYTHON_USE_EXC_INFO_STACK
34496 : _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
34497 : *type = exc_info->exc_type;
34498 : *value = exc_info->exc_value;
34499 : *tb = exc_info->exc_traceback;
34500 : Py_XINCREF(*type);
34501 : Py_XINCREF(*value);
34502 : Py_XINCREF(*tb);
34503 : #else
34504 : *type = tstate->exc_type;
34505 : *value = tstate->exc_value;
34506 : *tb = tstate->exc_traceback;
34507 : Py_XINCREF(*type);
34508 : Py_XINCREF(*value);
34509 : Py_XINCREF(*tb);
34510 : #endif
34511 19 : }
34512 0 : static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
34513 : #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
34514 0 : _PyErr_StackItem *exc_info = tstate->exc_info;
34515 0 : PyObject *tmp_value = exc_info->exc_value;
34516 0 : exc_info->exc_value = value;
34517 0 : Py_XDECREF(tmp_value);
34518 0 : Py_XDECREF(type);
34519 0 : Py_XDECREF(tb);
34520 : #else
34521 : PyObject *tmp_type, *tmp_value, *tmp_tb;
34522 : #if CYTHON_USE_EXC_INFO_STACK
34523 : _PyErr_StackItem *exc_info = tstate->exc_info;
34524 : tmp_type = exc_info->exc_type;
34525 : tmp_value = exc_info->exc_value;
34526 : tmp_tb = exc_info->exc_traceback;
34527 : exc_info->exc_type = type;
34528 : exc_info->exc_value = value;
34529 : exc_info->exc_traceback = tb;
34530 : #else
34531 : tmp_type = tstate->exc_type;
34532 : tmp_value = tstate->exc_value;
34533 : tmp_tb = tstate->exc_traceback;
34534 : tstate->exc_type = type;
34535 : tstate->exc_value = value;
34536 : tstate->exc_traceback = tb;
34537 : #endif
34538 : Py_XDECREF(tmp_type);
34539 : Py_XDECREF(tmp_value);
34540 : Py_XDECREF(tmp_tb);
34541 : #endif
34542 0 : }
34543 : #endif
34544 :
34545 : /* GetException */
34546 : #if CYTHON_FAST_THREAD_STATE
34547 0 : static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
34548 : #else
34549 : static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
34550 : #endif
34551 : {
34552 0 : PyObject *local_type = NULL, *local_value, *local_tb = NULL;
34553 : #if CYTHON_FAST_THREAD_STATE
34554 0 : PyObject *tmp_type, *tmp_value, *tmp_tb;
34555 : #if PY_VERSION_HEX >= 0x030C00A6
34556 0 : local_value = tstate->current_exception;
34557 0 : tstate->current_exception = 0;
34558 0 : if (likely(local_value)) {
34559 0 : local_type = (PyObject*) Py_TYPE(local_value);
34560 0 : Py_INCREF(local_type);
34561 0 : local_tb = PyException_GetTraceback(local_value);
34562 : }
34563 : #else
34564 : local_type = tstate->curexc_type;
34565 : local_value = tstate->curexc_value;
34566 : local_tb = tstate->curexc_traceback;
34567 : tstate->curexc_type = 0;
34568 : tstate->curexc_value = 0;
34569 : tstate->curexc_traceback = 0;
34570 : #endif
34571 : #else
34572 : PyErr_Fetch(&local_type, &local_value, &local_tb);
34573 : #endif
34574 0 : PyErr_NormalizeException(&local_type, &local_value, &local_tb);
34575 : #if CYTHON_FAST_THREAD_STATE && PY_VERSION_HEX >= 0x030C00A6
34576 0 : if (unlikely(tstate->current_exception))
34577 : #elif CYTHON_FAST_THREAD_STATE
34578 : if (unlikely(tstate->curexc_type))
34579 : #else
34580 : if (unlikely(PyErr_Occurred()))
34581 : #endif
34582 0 : goto bad;
34583 : #if PY_MAJOR_VERSION >= 3
34584 0 : if (local_tb) {
34585 0 : if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
34586 0 : goto bad;
34587 : }
34588 : #endif
34589 0 : Py_XINCREF(local_tb);
34590 0 : Py_XINCREF(local_type);
34591 0 : Py_XINCREF(local_value);
34592 0 : *type = local_type;
34593 0 : *value = local_value;
34594 0 : *tb = local_tb;
34595 : #if CYTHON_FAST_THREAD_STATE
34596 : #if CYTHON_USE_EXC_INFO_STACK
34597 : {
34598 0 : _PyErr_StackItem *exc_info = tstate->exc_info;
34599 : #if PY_VERSION_HEX >= 0x030B00a4
34600 0 : tmp_value = exc_info->exc_value;
34601 0 : exc_info->exc_value = local_value;
34602 0 : tmp_type = NULL;
34603 0 : tmp_tb = NULL;
34604 0 : Py_XDECREF(local_type);
34605 0 : Py_XDECREF(local_tb);
34606 : #else
34607 : tmp_type = exc_info->exc_type;
34608 : tmp_value = exc_info->exc_value;
34609 : tmp_tb = exc_info->exc_traceback;
34610 : exc_info->exc_type = local_type;
34611 : exc_info->exc_value = local_value;
34612 : exc_info->exc_traceback = local_tb;
34613 : #endif
34614 : }
34615 : #else
34616 : tmp_type = tstate->exc_type;
34617 : tmp_value = tstate->exc_value;
34618 : tmp_tb = tstate->exc_traceback;
34619 : tstate->exc_type = local_type;
34620 : tstate->exc_value = local_value;
34621 : tstate->exc_traceback = local_tb;
34622 : #endif
34623 0 : Py_XDECREF(tmp_type);
34624 0 : Py_XDECREF(tmp_value);
34625 0 : Py_XDECREF(tmp_tb);
34626 : #else
34627 : PyErr_SetExcInfo(local_type, local_value, local_tb);
34628 : #endif
34629 0 : return 0;
34630 0 : bad:
34631 0 : *type = 0;
34632 0 : *value = 0;
34633 0 : *tb = 0;
34634 0 : Py_XDECREF(local_type);
34635 0 : Py_XDECREF(local_value);
34636 0 : Py_XDECREF(local_tb);
34637 0 : return -1;
34638 : }
34639 :
34640 : /* SwapException */
34641 : #if CYTHON_FAST_THREAD_STATE
34642 0 : static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
34643 0 : PyObject *tmp_type, *tmp_value, *tmp_tb;
34644 : #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
34645 0 : _PyErr_StackItem *exc_info = tstate->exc_info;
34646 0 : tmp_value = exc_info->exc_value;
34647 0 : exc_info->exc_value = *value;
34648 0 : if (tmp_value == NULL || tmp_value == Py_None) {
34649 0 : Py_XDECREF(tmp_value);
34650 0 : tmp_value = NULL;
34651 0 : tmp_type = NULL;
34652 0 : tmp_tb = NULL;
34653 : } else {
34654 0 : tmp_type = (PyObject*) Py_TYPE(tmp_value);
34655 0 : Py_INCREF(tmp_type);
34656 : #if CYTHON_COMPILING_IN_CPYTHON
34657 0 : tmp_tb = ((PyBaseExceptionObject*) tmp_value)->traceback;
34658 0 : Py_XINCREF(tmp_tb);
34659 : #else
34660 : tmp_tb = PyException_GetTraceback(tmp_value);
34661 : #endif
34662 : }
34663 : #elif CYTHON_USE_EXC_INFO_STACK
34664 : _PyErr_StackItem *exc_info = tstate->exc_info;
34665 : tmp_type = exc_info->exc_type;
34666 : tmp_value = exc_info->exc_value;
34667 : tmp_tb = exc_info->exc_traceback;
34668 : exc_info->exc_type = *type;
34669 : exc_info->exc_value = *value;
34670 : exc_info->exc_traceback = *tb;
34671 : #else
34672 : tmp_type = tstate->exc_type;
34673 : tmp_value = tstate->exc_value;
34674 : tmp_tb = tstate->exc_traceback;
34675 : tstate->exc_type = *type;
34676 : tstate->exc_value = *value;
34677 : tstate->exc_traceback = *tb;
34678 : #endif
34679 0 : *type = tmp_type;
34680 0 : *value = tmp_value;
34681 0 : *tb = tmp_tb;
34682 0 : }
34683 : #else
34684 : static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
34685 : PyObject *tmp_type, *tmp_value, *tmp_tb;
34686 : PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
34687 : PyErr_SetExcInfo(*type, *value, *tb);
34688 : *type = tmp_type;
34689 : *value = tmp_value;
34690 : *tb = tmp_tb;
34691 : }
34692 : #endif
34693 :
34694 : /* Import */
34695 6 : static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
34696 6 : PyObject *module = 0;
34697 6 : PyObject *empty_dict = 0;
34698 6 : PyObject *empty_list = 0;
34699 : #if PY_MAJOR_VERSION < 3
34700 : PyObject *py_import;
34701 : py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
34702 : if (unlikely(!py_import))
34703 : goto bad;
34704 : if (!from_list) {
34705 : empty_list = PyList_New(0);
34706 : if (unlikely(!empty_list))
34707 : goto bad;
34708 : from_list = empty_list;
34709 : }
34710 : #endif
34711 6 : empty_dict = PyDict_New();
34712 6 : if (unlikely(!empty_dict))
34713 0 : goto bad;
34714 : {
34715 : #if PY_MAJOR_VERSION >= 3
34716 6 : if (level == -1) {
34717 0 : if (strchr(__Pyx_MODULE_NAME, '.') != NULL) {
34718 0 : module = PyImport_ImportModuleLevelObject(
34719 0 : name, __pyx_d, empty_dict, from_list, 1);
34720 0 : if (unlikely(!module)) {
34721 0 : if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError)))
34722 0 : goto bad;
34723 0 : PyErr_Clear();
34724 : }
34725 : }
34726 0 : level = 0;
34727 : }
34728 : #endif
34729 0 : if (!module) {
34730 : #if PY_MAJOR_VERSION < 3
34731 : PyObject *py_level = PyInt_FromLong(level);
34732 : if (unlikely(!py_level))
34733 : goto bad;
34734 : module = PyObject_CallFunctionObjArgs(py_import,
34735 : name, __pyx_d, empty_dict, from_list, py_level, (PyObject *)NULL);
34736 : Py_DECREF(py_level);
34737 : #else
34738 6 : module = PyImport_ImportModuleLevelObject(
34739 6 : name, __pyx_d, empty_dict, from_list, level);
34740 : #endif
34741 : }
34742 : }
34743 6 : bad:
34744 6 : Py_XDECREF(empty_dict);
34745 6 : Py_XDECREF(empty_list);
34746 : #if PY_MAJOR_VERSION < 3
34747 : Py_XDECREF(py_import);
34748 : #endif
34749 6 : return module;
34750 : }
34751 :
34752 : /* ImportDottedModule */
34753 : #if PY_MAJOR_VERSION >= 3
34754 0 : static PyObject *__Pyx__ImportDottedModule_Error(PyObject *name, PyObject *parts_tuple, Py_ssize_t count) {
34755 0 : PyObject *partial_name = NULL, *slice = NULL, *sep = NULL;
34756 0 : if (unlikely(PyErr_Occurred())) {
34757 0 : PyErr_Clear();
34758 : }
34759 0 : if (likely(PyTuple_GET_SIZE(parts_tuple) == count)) {
34760 : partial_name = name;
34761 : } else {
34762 0 : slice = PySequence_GetSlice(parts_tuple, 0, count);
34763 0 : if (unlikely(!slice))
34764 0 : goto bad;
34765 0 : sep = PyUnicode_FromStringAndSize(".", 1);
34766 0 : if (unlikely(!sep))
34767 0 : goto bad;
34768 0 : partial_name = PyUnicode_Join(sep, slice);
34769 : }
34770 0 : PyErr_Format(
34771 : #if PY_MAJOR_VERSION < 3
34772 : PyExc_ImportError,
34773 : "No module named '%s'", PyString_AS_STRING(partial_name));
34774 : #else
34775 : #if PY_VERSION_HEX >= 0x030600B1
34776 : PyExc_ModuleNotFoundError,
34777 : #else
34778 : PyExc_ImportError,
34779 : #endif
34780 : "No module named '%U'", partial_name);
34781 : #endif
34782 0 : bad:
34783 0 : Py_XDECREF(sep);
34784 0 : Py_XDECREF(slice);
34785 0 : Py_XDECREF(partial_name);
34786 0 : return NULL;
34787 : }
34788 : #endif
34789 : #if PY_MAJOR_VERSION >= 3
34790 3 : static PyObject *__Pyx__ImportDottedModule_Lookup(PyObject *name) {
34791 3 : PyObject *imported_module;
34792 : #if PY_VERSION_HEX < 0x030700A1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400)
34793 : PyObject *modules = PyImport_GetModuleDict();
34794 : if (unlikely(!modules))
34795 : return NULL;
34796 : imported_module = __Pyx_PyDict_GetItemStr(modules, name);
34797 : Py_XINCREF(imported_module);
34798 : #else
34799 6 : imported_module = PyImport_GetModule(name);
34800 : #endif
34801 3 : return imported_module;
34802 : }
34803 : #endif
34804 : #if PY_MAJOR_VERSION >= 3
34805 0 : static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple) {
34806 0 : Py_ssize_t i, nparts;
34807 0 : nparts = PyTuple_GET_SIZE(parts_tuple);
34808 0 : for (i=1; i < nparts && module; i++) {
34809 0 : PyObject *part, *submodule;
34810 : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
34811 0 : part = PyTuple_GET_ITEM(parts_tuple, i);
34812 : #else
34813 : part = PySequence_ITEM(parts_tuple, i);
34814 : #endif
34815 0 : submodule = __Pyx_PyObject_GetAttrStrNoError(module, part);
34816 : #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
34817 : Py_DECREF(part);
34818 : #endif
34819 0 : Py_DECREF(module);
34820 0 : module = submodule;
34821 : }
34822 0 : if (unlikely(!module)) {
34823 0 : return __Pyx__ImportDottedModule_Error(name, parts_tuple, i);
34824 : }
34825 : return module;
34826 : }
34827 : #endif
34828 0 : static PyObject *__Pyx__ImportDottedModule(PyObject *name, PyObject *parts_tuple) {
34829 : #if PY_MAJOR_VERSION < 3
34830 : PyObject *module, *from_list, *star = __pyx_n_s__3;
34831 : CYTHON_UNUSED_VAR(parts_tuple);
34832 : from_list = PyList_New(1);
34833 : if (unlikely(!from_list))
34834 : return NULL;
34835 : Py_INCREF(star);
34836 : PyList_SET_ITEM(from_list, 0, star);
34837 : module = __Pyx_Import(name, from_list, 0);
34838 : Py_DECREF(from_list);
34839 : return module;
34840 : #else
34841 0 : PyObject *imported_module;
34842 0 : PyObject *module = __Pyx_Import(name, NULL, 0);
34843 0 : if (!parts_tuple || unlikely(!module))
34844 : return module;
34845 0 : imported_module = __Pyx__ImportDottedModule_Lookup(name);
34846 0 : if (likely(imported_module)) {
34847 0 : Py_DECREF(module);
34848 0 : return imported_module;
34849 : }
34850 0 : PyErr_Clear();
34851 0 : return __Pyx_ImportDottedModule_WalkParts(module, name, parts_tuple);
34852 : #endif
34853 : }
34854 3 : static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple) {
34855 : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030400B1
34856 3 : PyObject *module = __Pyx__ImportDottedModule_Lookup(name);
34857 3 : if (likely(module)) {
34858 3 : PyObject *spec = __Pyx_PyObject_GetAttrStrNoError(module, __pyx_n_s_spec);
34859 3 : if (likely(spec)) {
34860 3 : PyObject *unsafe = __Pyx_PyObject_GetAttrStrNoError(spec, __pyx_n_s_initializing);
34861 3 : if (likely(!unsafe || !__Pyx_PyObject_IsTrue(unsafe))) {
34862 3 : Py_DECREF(spec);
34863 : spec = NULL;
34864 : }
34865 3 : Py_XDECREF(unsafe);
34866 : }
34867 3 : if (likely(!spec)) {
34868 3 : PyErr_Clear();
34869 3 : return module;
34870 : }
34871 0 : Py_DECREF(spec);
34872 0 : Py_DECREF(module);
34873 0 : } else if (PyErr_Occurred()) {
34874 0 : PyErr_Clear();
34875 : }
34876 : #endif
34877 0 : return __Pyx__ImportDottedModule(name, parts_tuple);
34878 : }
34879 :
34880 : /* FastTypeChecks */
34881 : #if CYTHON_COMPILING_IN_CPYTHON
34882 : static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
34883 0 : while (a) {
34884 0 : a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*);
34885 0 : if (a == b)
34886 : return 1;
34887 : }
34888 0 : return b == &PyBaseObject_Type;
34889 : }
34890 4146 : static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
34891 4146 : PyObject *mro;
34892 4146 : if (a == b) return 1;
34893 3057 : mro = a->tp_mro;
34894 3057 : if (likely(mro)) {
34895 3057 : Py_ssize_t i, n;
34896 3057 : n = PyTuple_GET_SIZE(mro);
34897 9171 : for (i = 0; i < n; i++) {
34898 6114 : if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
34899 : return 1;
34900 : }
34901 : return 0;
34902 : }
34903 4146 : return __Pyx_InBases(a, b);
34904 : }
34905 858 : static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) {
34906 858 : PyObject *mro;
34907 858 : if (cls == a || cls == b) return 1;
34908 22 : mro = cls->tp_mro;
34909 22 : if (likely(mro)) {
34910 22 : Py_ssize_t i, n;
34911 22 : n = PyTuple_GET_SIZE(mro);
34912 66 : for (i = 0; i < n; i++) {
34913 44 : PyObject *base = PyTuple_GET_ITEM(mro, i);
34914 44 : if (base == (PyObject *)a || base == (PyObject *)b)
34915 : return 1;
34916 : }
34917 : return 0;
34918 : }
34919 0 : return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b);
34920 : }
34921 : #if PY_MAJOR_VERSION == 2
34922 : static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
34923 : PyObject *exception, *value, *tb;
34924 : int res;
34925 : __Pyx_PyThreadState_declare
34926 : __Pyx_PyThreadState_assign
34927 : __Pyx_ErrFetch(&exception, &value, &tb);
34928 : res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
34929 : if (unlikely(res == -1)) {
34930 : PyErr_WriteUnraisable(err);
34931 : res = 0;
34932 : }
34933 : if (!res) {
34934 : res = PyObject_IsSubclass(err, exc_type2);
34935 : if (unlikely(res == -1)) {
34936 : PyErr_WriteUnraisable(err);
34937 : res = 0;
34938 : }
34939 : }
34940 : __Pyx_ErrRestore(exception, value, tb);
34941 : return res;
34942 : }
34943 : #else
34944 0 : static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
34945 0 : if (exc_type1) {
34946 0 : return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2);
34947 : } else {
34948 0 : return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
34949 : }
34950 : }
34951 : #endif
34952 0 : static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
34953 0 : Py_ssize_t i, n;
34954 0 : assert(PyExceptionClass_Check(exc_type));
34955 0 : n = PyTuple_GET_SIZE(tuple);
34956 : #if PY_MAJOR_VERSION >= 3
34957 0 : for (i=0; i<n; i++) {
34958 0 : if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
34959 : }
34960 : #endif
34961 0 : for (i=0; i<n; i++) {
34962 0 : PyObject *t = PyTuple_GET_ITEM(tuple, i);
34963 : #if PY_MAJOR_VERSION < 3
34964 : if (likely(exc_type == t)) return 1;
34965 : #endif
34966 0 : if (likely(PyExceptionClass_Check(t))) {
34967 0 : if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
34968 : } else {
34969 0 : }
34970 : }
34971 : return 0;
34972 : }
34973 0 : static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
34974 0 : if (likely(err == exc_type)) return 1;
34975 0 : if (likely(PyExceptionClass_Check(err))) {
34976 0 : if (likely(PyExceptionClass_Check(exc_type))) {
34977 0 : return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
34978 0 : } else if (likely(PyTuple_Check(exc_type))) {
34979 0 : return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
34980 : } else {
34981 0 : }
34982 : }
34983 0 : return PyErr_GivenExceptionMatches(err, exc_type);
34984 : }
34985 0 : static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
34986 0 : assert(PyExceptionClass_Check(exc_type1));
34987 0 : assert(PyExceptionClass_Check(exc_type2));
34988 0 : if (likely(err == exc_type1 || err == exc_type2)) return 1;
34989 0 : if (likely(PyExceptionClass_Check(err))) {
34990 0 : return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
34991 : }
34992 0 : return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
34993 : }
34994 : #endif
34995 :
34996 : /* PySequenceMultiply */
34997 0 : static PyObject* __Pyx_PySequence_Multiply_Generic(PyObject *seq, Py_ssize_t mul) {
34998 0 : PyObject *result, *pymul = PyInt_FromSsize_t(mul);
34999 0 : if (unlikely(!pymul))
35000 : return NULL;
35001 0 : result = PyNumber_Multiply(seq, pymul);
35002 0 : Py_DECREF(pymul);
35003 : return result;
35004 : }
35005 0 : static CYTHON_INLINE PyObject* __Pyx_PySequence_Multiply(PyObject *seq, Py_ssize_t mul) {
35006 : #if CYTHON_USE_TYPE_SLOTS
35007 0 : PyTypeObject *type = Py_TYPE(seq);
35008 0 : if (likely(type->tp_as_sequence && type->tp_as_sequence->sq_repeat)) {
35009 0 : return type->tp_as_sequence->sq_repeat(seq, mul);
35010 : } else
35011 : #endif
35012 : {
35013 0 : return __Pyx_PySequence_Multiply_Generic(seq, mul);
35014 : }
35015 : }
35016 :
35017 : /* SetItemInt */
35018 0 : static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
35019 0 : int r;
35020 0 : if (unlikely(!j)) return -1;
35021 0 : r = PyObject_SetItem(o, j, v);
35022 0 : Py_DECREF(j);
35023 : return r;
35024 : }
35025 1099 : static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list,
35026 : CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) {
35027 : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
35028 1099 : if (is_list || PyList_CheckExact(o)) {
35029 1099 : Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
35030 1099 : if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) {
35031 1099 : PyObject* old = PyList_GET_ITEM(o, n);
35032 1099 : Py_INCREF(v);
35033 1099 : PyList_SET_ITEM(o, n, v);
35034 1099 : Py_DECREF(old);
35035 1099 : return 1;
35036 : }
35037 : } else {
35038 0 : PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping;
35039 0 : PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence;
35040 0 : if (mm && mm->mp_ass_subscript) {
35041 0 : int r;
35042 0 : PyObject *key = PyInt_FromSsize_t(i);
35043 0 : if (unlikely(!key)) return -1;
35044 0 : r = mm->mp_ass_subscript(o, key, v);
35045 0 : Py_DECREF(key);
35046 0 : return r;
35047 : }
35048 0 : if (likely(sm && sm->sq_ass_item)) {
35049 0 : if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) {
35050 0 : Py_ssize_t l = sm->sq_length(o);
35051 0 : if (likely(l >= 0)) {
35052 0 : i += l;
35053 : } else {
35054 0 : if (!PyErr_ExceptionMatches(PyExc_OverflowError))
35055 : return -1;
35056 0 : PyErr_Clear();
35057 : }
35058 : }
35059 0 : return sm->sq_ass_item(o, i, v);
35060 : }
35061 : }
35062 : #else
35063 : if (is_list || !PyMapping_Check(o))
35064 : {
35065 : return PySequence_SetItem(o, i, v);
35066 : }
35067 : #endif
35068 0 : return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
35069 : }
35070 :
35071 : /* RaiseUnboundLocalError */
35072 0 : static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
35073 0 : PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
35074 : }
35075 :
35076 : /* DivInt[long] */
35077 0 : static CYTHON_INLINE long __Pyx_div_long(long a, long b) {
35078 0 : long q = a / b;
35079 0 : long r = a - q*b;
35080 0 : q -= ((r != 0) & ((r ^ b) < 0));
35081 0 : return q;
35082 : }
35083 :
35084 : /* ImportFrom */
35085 0 : static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
35086 0 : PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
35087 0 : if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
35088 0 : const char* module_name_str = 0;
35089 0 : PyObject* module_name = 0;
35090 0 : PyObject* module_dot = 0;
35091 0 : PyObject* full_name = 0;
35092 0 : PyErr_Clear();
35093 0 : module_name_str = PyModule_GetName(module);
35094 0 : if (unlikely(!module_name_str)) { goto modbad; }
35095 0 : module_name = PyUnicode_FromString(module_name_str);
35096 0 : if (unlikely(!module_name)) { goto modbad; }
35097 0 : module_dot = PyUnicode_Concat(module_name, __pyx_kp_u__2);
35098 0 : if (unlikely(!module_dot)) { goto modbad; }
35099 0 : full_name = PyUnicode_Concat(module_dot, name);
35100 0 : if (unlikely(!full_name)) { goto modbad; }
35101 : #if PY_VERSION_HEX < 0x030700A1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400)
35102 : {
35103 : PyObject *modules = PyImport_GetModuleDict();
35104 : if (unlikely(!modules))
35105 : goto modbad;
35106 : value = PyObject_GetItem(modules, full_name);
35107 : }
35108 : #else
35109 0 : value = PyImport_GetModule(full_name);
35110 : #endif
35111 0 : modbad:
35112 0 : Py_XDECREF(full_name);
35113 0 : Py_XDECREF(module_dot);
35114 0 : Py_XDECREF(module_name);
35115 : }
35116 0 : if (unlikely(!value)) {
35117 0 : PyErr_Format(PyExc_ImportError,
35118 : #if PY_MAJOR_VERSION < 3
35119 : "cannot import name %.230s", PyString_AS_STRING(name));
35120 : #else
35121 : "cannot import name %S", name);
35122 : #endif
35123 : }
35124 0 : return value;
35125 : }
35126 :
35127 : /* HasAttr */
35128 0 : static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
35129 0 : PyObject *r;
35130 0 : if (unlikely(!__Pyx_PyBaseString_Check(n))) {
35131 0 : PyErr_SetString(PyExc_TypeError,
35132 : "hasattr(): attribute name must be string");
35133 0 : return -1;
35134 : }
35135 0 : r = __Pyx_GetAttr(o, n);
35136 0 : if (!r) {
35137 0 : PyErr_Clear();
35138 0 : return 0;
35139 : } else {
35140 0 : Py_DECREF(r);
35141 0 : return 1;
35142 : }
35143 : }
35144 :
35145 : /* PyObjectLookupSpecial */
35146 : #if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
35147 8 : static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error) {
35148 8 : PyObject *res;
35149 8 : PyTypeObject *tp = Py_TYPE(obj);
35150 : #if PY_MAJOR_VERSION < 3
35151 : if (unlikely(PyInstance_Check(obj)))
35152 : return with_error ? __Pyx_PyObject_GetAttrStr(obj, attr_name) : __Pyx_PyObject_GetAttrStrNoError(obj, attr_name);
35153 : #endif
35154 8 : res = _PyType_Lookup(tp, attr_name);
35155 8 : if (likely(res)) {
35156 8 : descrgetfunc f = Py_TYPE(res)->tp_descr_get;
35157 8 : if (!f) {
35158 0 : Py_INCREF(res);
35159 : } else {
35160 8 : res = f(res, obj, (PyObject *)tp);
35161 : }
35162 0 : } else if (with_error) {
35163 0 : PyErr_SetObject(PyExc_AttributeError, attr_name);
35164 : }
35165 8 : return res;
35166 : }
35167 : #endif
35168 :
35169 : /* DictGetItem */
35170 : #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
35171 1804 : static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
35172 1804 : PyObject *value;
35173 1804 : value = PyDict_GetItemWithError(d, key);
35174 1804 : if (unlikely(!value)) {
35175 0 : if (!PyErr_Occurred()) {
35176 0 : if (unlikely(PyTuple_Check(key))) {
35177 0 : PyObject* args = PyTuple_Pack(1, key);
35178 0 : if (likely(args)) {
35179 0 : PyErr_SetObject(PyExc_KeyError, args);
35180 0 : Py_DECREF(args);
35181 : }
35182 : } else {
35183 0 : PyErr_SetObject(PyExc_KeyError, key);
35184 : }
35185 : }
35186 0 : return NULL;
35187 : }
35188 1804 : Py_INCREF(value);
35189 : return value;
35190 : }
35191 : #endif
35192 :
35193 : /* UnicodeAsUCS4 */
35194 1089 : static CYTHON_INLINE Py_UCS4 __Pyx_PyUnicode_AsPy_UCS4(PyObject* x) {
35195 1089 : Py_ssize_t length;
35196 : #if CYTHON_PEP393_ENABLED
35197 1089 : length = PyUnicode_GET_LENGTH(x);
35198 1089 : if (likely(length == 1)) {
35199 1089 : return PyUnicode_READ_CHAR(x, 0);
35200 : }
35201 : #else
35202 : length = PyUnicode_GET_SIZE(x);
35203 : if (likely(length == 1)) {
35204 : return PyUnicode_AS_UNICODE(x)[0];
35205 : }
35206 : #if Py_UNICODE_SIZE == 2
35207 : else if (PyUnicode_GET_SIZE(x) == 2) {
35208 : Py_UCS4 high_val = PyUnicode_AS_UNICODE(x)[0];
35209 : if (high_val >= 0xD800 && high_val <= 0xDBFF) {
35210 : Py_UCS4 low_val = PyUnicode_AS_UNICODE(x)[1];
35211 : if (low_val >= 0xDC00 && low_val <= 0xDFFF) {
35212 : return 0x10000 + (((high_val & ((1<<10)-1)) << 10) | (low_val & ((1<<10)-1)));
35213 : }
35214 : }
35215 : }
35216 : #endif
35217 : #endif
35218 0 : PyErr_Format(PyExc_ValueError,
35219 : "only single character unicode strings can be converted to Py_UCS4, "
35220 : "got length %" CYTHON_FORMAT_SSIZE_T "d", length);
35221 0 : return (Py_UCS4)-1;
35222 : }
35223 :
35224 : /* object_ord */
35225 0 : static long __Pyx__PyObject_Ord(PyObject* c) {
35226 0 : Py_ssize_t size;
35227 0 : if (PyBytes_Check(c)) {
35228 0 : size = PyBytes_GET_SIZE(c);
35229 0 : if (likely(size == 1)) {
35230 0 : return (unsigned char) PyBytes_AS_STRING(c)[0];
35231 : }
35232 : #if PY_MAJOR_VERSION < 3
35233 : } else if (PyUnicode_Check(c)) {
35234 : return (long)__Pyx_PyUnicode_AsPy_UCS4(c);
35235 : #endif
35236 : #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
35237 0 : } else if (PyByteArray_Check(c)) {
35238 0 : size = PyByteArray_GET_SIZE(c);
35239 0 : if (likely(size == 1)) {
35240 0 : return (unsigned char) PyByteArray_AS_STRING(c)[0];
35241 : }
35242 : #endif
35243 : } else {
35244 0 : __Pyx_TypeName c_type_name = __Pyx_PyType_GetName(Py_TYPE(c));
35245 0 : PyErr_Format(PyExc_TypeError,
35246 : "ord() expected string of length 1, but " __Pyx_FMT_TYPENAME " found",
35247 : c_type_name);
35248 0 : __Pyx_DECREF_TypeName(c_type_name);
35249 0 : return (long)(Py_UCS4)-1;
35250 : }
35251 0 : PyErr_Format(PyExc_TypeError,
35252 : "ord() expected a character, but string of length %zd found", size);
35253 0 : return (long)(Py_UCS4)-1;
35254 : }
35255 :
35256 : /* memoryview_get_from_buffer */
35257 : #if !CYTHON_COMPILING_IN_LIMITED_API || CYTHON_LIMITED_API >= 0x030b0000
35258 : #else
35259 : static Py_ssize_t __Pyx_PyMemoryView_Get_itemsize(PyObject *obj) {
35260 : Py_ssize_t result;
35261 : PyObject *attr = PyObject_GetAttr(obj, __pyx_n_s_itemsize);
35262 : if (!attr) {
35263 : goto bad;
35264 : }
35265 : result = PyLong_AsSsize_t(attr);
35266 : Py_DECREF(attr);
35267 : return result;
35268 : bad:
35269 : Py_XDECREF(attr);
35270 : return -1;
35271 : }
35272 : #endif
35273 :
35274 : /* memoryview_get_from_buffer */
35275 : #if !CYTHON_COMPILING_IN_LIMITED_API || CYTHON_LIMITED_API >= 0x030b0000
35276 : #else
35277 : static int __Pyx_PyMemoryView_Get_ndim(PyObject *obj) {
35278 : int result;
35279 : PyObject *attr = PyObject_GetAttr(obj, __pyx_n_s_ndim);
35280 : if (!attr) {
35281 : goto bad;
35282 : }
35283 : result = PyLong_AsLong(attr);
35284 : Py_DECREF(attr);
35285 : return result;
35286 : bad:
35287 : Py_XDECREF(attr);
35288 : return -1;
35289 : }
35290 : #endif
35291 :
35292 : /* IterFinish */
35293 0 : static CYTHON_INLINE int __Pyx_IterFinish(void) {
35294 0 : PyObject* exc_type;
35295 0 : __Pyx_PyThreadState_declare
35296 0 : __Pyx_PyThreadState_assign
35297 0 : exc_type = __Pyx_PyErr_CurrentExceptionType();
35298 0 : if (unlikely(exc_type)) {
35299 0 : if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))
35300 : return -1;
35301 0 : __Pyx_PyErr_Clear();
35302 0 : return 0;
35303 : }
35304 : return 0;
35305 : }
35306 :
35307 : /* PyObjectCallNoArg */
35308 : static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
35309 : PyObject *arg[2] = {NULL, NULL};
35310 : return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
35311 : }
35312 :
35313 : /* PyObjectGetMethod */
35314 : static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
35315 : PyObject *attr;
35316 : #if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
35317 : __Pyx_TypeName type_name;
35318 : PyTypeObject *tp = Py_TYPE(obj);
35319 : PyObject *descr;
35320 : descrgetfunc f = NULL;
35321 : PyObject **dictptr, *dict;
35322 : int meth_found = 0;
35323 : assert (*method == NULL);
35324 : if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
35325 : attr = __Pyx_PyObject_GetAttrStr(obj, name);
35326 : goto try_unpack;
35327 : }
35328 : if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
35329 : return 0;
35330 : }
35331 : descr = _PyType_Lookup(tp, name);
35332 : if (likely(descr != NULL)) {
35333 : Py_INCREF(descr);
35334 : #if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR
35335 : if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR))
35336 : #elif PY_MAJOR_VERSION >= 3
35337 : #ifdef __Pyx_CyFunction_USED
35338 : if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
35339 : #else
35340 : if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type)))
35341 : #endif
35342 : #else
35343 : #ifdef __Pyx_CyFunction_USED
35344 : if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
35345 : #else
35346 : if (likely(PyFunction_Check(descr)))
35347 : #endif
35348 : #endif
35349 : {
35350 : meth_found = 1;
35351 : } else {
35352 : f = Py_TYPE(descr)->tp_descr_get;
35353 : if (f != NULL && PyDescr_IsData(descr)) {
35354 : attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
35355 : Py_DECREF(descr);
35356 : goto try_unpack;
35357 : }
35358 : }
35359 : }
35360 : dictptr = _PyObject_GetDictPtr(obj);
35361 : if (dictptr != NULL && (dict = *dictptr) != NULL) {
35362 : Py_INCREF(dict);
35363 : attr = __Pyx_PyDict_GetItemStr(dict, name);
35364 : if (attr != NULL) {
35365 : Py_INCREF(attr);
35366 : Py_DECREF(dict);
35367 : Py_XDECREF(descr);
35368 : goto try_unpack;
35369 : }
35370 : Py_DECREF(dict);
35371 : }
35372 : if (meth_found) {
35373 : *method = descr;
35374 : return 1;
35375 : }
35376 : if (f != NULL) {
35377 : attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
35378 : Py_DECREF(descr);
35379 : goto try_unpack;
35380 : }
35381 : if (likely(descr != NULL)) {
35382 : *method = descr;
35383 : return 0;
35384 : }
35385 : type_name = __Pyx_PyType_GetName(tp);
35386 : PyErr_Format(PyExc_AttributeError,
35387 : #if PY_MAJOR_VERSION >= 3
35388 : "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'",
35389 : type_name, name);
35390 : #else
35391 : "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'",
35392 : type_name, PyString_AS_STRING(name));
35393 : #endif
35394 : __Pyx_DECREF_TypeName(type_name);
35395 : return 0;
35396 : #else
35397 : attr = __Pyx_PyObject_GetAttrStr(obj, name);
35398 : goto try_unpack;
35399 : #endif
35400 : try_unpack:
35401 : #if CYTHON_UNPACK_METHODS
35402 : if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
35403 : PyObject *function = PyMethod_GET_FUNCTION(attr);
35404 : Py_INCREF(function);
35405 : Py_DECREF(attr);
35406 : *method = function;
35407 : return 1;
35408 : }
35409 : #endif
35410 : *method = attr;
35411 : return 0;
35412 : }
35413 :
35414 : /* PyObjectCallMethod0 */
35415 : static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
35416 : PyObject *method = NULL, *result = NULL;
35417 : int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
35418 : if (likely(is_method)) {
35419 : result = __Pyx_PyObject_CallOneArg(method, obj);
35420 : Py_DECREF(method);
35421 : return result;
35422 : }
35423 : if (unlikely(!method)) goto bad;
35424 : result = __Pyx_PyObject_CallNoArg(method);
35425 : Py_DECREF(method);
35426 : bad:
35427 : return result;
35428 : }
35429 :
35430 : /* UnpackItemEndCheck */
35431 0 : static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
35432 0 : if (unlikely(retval)) {
35433 0 : Py_DECREF(retval);
35434 0 : __Pyx_RaiseTooManyValuesError(expected);
35435 0 : return -1;
35436 : }
35437 0 : return __Pyx_IterFinish();
35438 : }
35439 :
35440 : /* UnpackTupleError */
35441 0 : static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) {
35442 0 : if (t == Py_None) {
35443 0 : __Pyx_RaiseNoneNotIterableError();
35444 0 : } else if (PyTuple_GET_SIZE(t) < index) {
35445 0 : __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t));
35446 : } else {
35447 0 : __Pyx_RaiseTooManyValuesError(index);
35448 : }
35449 0 : }
35450 :
35451 : /* UnpackTuple2 */
35452 0 : static CYTHON_INLINE int __Pyx_unpack_tuple2_exact(
35453 : PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int decref_tuple) {
35454 0 : PyObject *value1 = NULL, *value2 = NULL;
35455 : #if CYTHON_COMPILING_IN_PYPY
35456 : value1 = PySequence_ITEM(tuple, 0); if (unlikely(!value1)) goto bad;
35457 : value2 = PySequence_ITEM(tuple, 1); if (unlikely(!value2)) goto bad;
35458 : #else
35459 0 : value1 = PyTuple_GET_ITEM(tuple, 0); Py_INCREF(value1);
35460 0 : value2 = PyTuple_GET_ITEM(tuple, 1); Py_INCREF(value2);
35461 : #endif
35462 0 : if (decref_tuple) {
35463 0 : Py_DECREF(tuple);
35464 : }
35465 0 : *pvalue1 = value1;
35466 0 : *pvalue2 = value2;
35467 0 : return 0;
35468 : #if CYTHON_COMPILING_IN_PYPY
35469 : bad:
35470 : Py_XDECREF(value1);
35471 : Py_XDECREF(value2);
35472 : if (decref_tuple) { Py_XDECREF(tuple); }
35473 : return -1;
35474 : #endif
35475 : }
35476 0 : static int __Pyx_unpack_tuple2_generic(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2,
35477 : int has_known_size, int decref_tuple) {
35478 0 : Py_ssize_t index;
35479 0 : PyObject *value1 = NULL, *value2 = NULL, *iter = NULL;
35480 0 : iternextfunc iternext;
35481 0 : iter = PyObject_GetIter(tuple);
35482 0 : if (unlikely(!iter)) goto bad;
35483 0 : if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; }
35484 0 : iternext = __Pyx_PyObject_GetIterNextFunc(iter);
35485 0 : value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; }
35486 0 : value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; }
35487 0 : if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad;
35488 0 : Py_DECREF(iter);
35489 0 : *pvalue1 = value1;
35490 0 : *pvalue2 = value2;
35491 0 : return 0;
35492 0 : unpacking_failed:
35493 0 : if (!has_known_size && __Pyx_IterFinish() == 0)
35494 0 : __Pyx_RaiseNeedMoreValuesError(index);
35495 0 : bad:
35496 0 : Py_XDECREF(iter);
35497 0 : Py_XDECREF(value1);
35498 0 : Py_XDECREF(value2);
35499 0 : if (decref_tuple) { Py_XDECREF(tuple); }
35500 : return -1;
35501 : }
35502 :
35503 : /* dict_iter */
35504 : #if CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
35505 : #include <string.h>
35506 : #endif
35507 9 : static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name,
35508 : Py_ssize_t* p_orig_length, int* p_source_is_dict) {
35509 9 : is_dict = is_dict || likely(PyDict_CheckExact(iterable));
35510 9 : *p_source_is_dict = is_dict;
35511 9 : if (is_dict) {
35512 : #if !CYTHON_COMPILING_IN_PYPY
35513 9 : *p_orig_length = PyDict_Size(iterable);
35514 9 : Py_INCREF(iterable);
35515 9 : return iterable;
35516 : #elif PY_MAJOR_VERSION >= 3
35517 : static PyObject *py_items = NULL, *py_keys = NULL, *py_values = NULL;
35518 : PyObject **pp = NULL;
35519 : if (method_name) {
35520 : const char *name = PyUnicode_AsUTF8(method_name);
35521 : if (strcmp(name, "iteritems") == 0) pp = &py_items;
35522 : else if (strcmp(name, "iterkeys") == 0) pp = &py_keys;
35523 : else if (strcmp(name, "itervalues") == 0) pp = &py_values;
35524 : if (pp) {
35525 : if (!*pp) {
35526 : *pp = PyUnicode_FromString(name + 4);
35527 : if (!*pp)
35528 : return NULL;
35529 : }
35530 : method_name = *pp;
35531 : }
35532 : }
35533 : #endif
35534 : }
35535 : *p_orig_length = 0;
35536 : if (method_name) {
35537 : PyObject* iter;
35538 : iterable = __Pyx_PyObject_CallMethod0(iterable, method_name);
35539 : if (!iterable)
35540 : return NULL;
35541 : #if !CYTHON_COMPILING_IN_PYPY
35542 : if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable))
35543 : return iterable;
35544 : #endif
35545 : iter = PyObject_GetIter(iterable);
35546 : Py_DECREF(iterable);
35547 : return iter;
35548 : }
35549 : return PyObject_GetIter(iterable);
35550 : }
35551 27 : static CYTHON_INLINE int __Pyx_dict_iter_next(
35552 : PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos,
35553 : PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) {
35554 27 : PyObject* next_item;
35555 : #if !CYTHON_COMPILING_IN_PYPY
35556 27 : if (source_is_dict) {
35557 27 : PyObject *key, *value;
35558 27 : if (unlikely(orig_length != PyDict_Size(iter_obj))) {
35559 0 : PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration");
35560 0 : return -1;
35561 : }
35562 27 : if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) {
35563 : return 0;
35564 : }
35565 18 : if (pitem) {
35566 0 : PyObject* tuple = PyTuple_New(2);
35567 0 : if (unlikely(!tuple)) {
35568 : return -1;
35569 : }
35570 0 : Py_INCREF(key);
35571 0 : Py_INCREF(value);
35572 0 : PyTuple_SET_ITEM(tuple, 0, key);
35573 0 : PyTuple_SET_ITEM(tuple, 1, value);
35574 0 : *pitem = tuple;
35575 : } else {
35576 18 : if (pkey) {
35577 18 : Py_INCREF(key);
35578 18 : *pkey = key;
35579 : }
35580 18 : if (pvalue) {
35581 0 : Py_INCREF(value);
35582 0 : *pvalue = value;
35583 : }
35584 : }
35585 18 : return 1;
35586 0 : } else if (PyTuple_CheckExact(iter_obj)) {
35587 0 : Py_ssize_t pos = *ppos;
35588 0 : if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0;
35589 0 : *ppos = pos + 1;
35590 0 : next_item = PyTuple_GET_ITEM(iter_obj, pos);
35591 0 : Py_INCREF(next_item);
35592 0 : } else if (PyList_CheckExact(iter_obj)) {
35593 0 : Py_ssize_t pos = *ppos;
35594 0 : if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0;
35595 0 : *ppos = pos + 1;
35596 0 : next_item = PyList_GET_ITEM(iter_obj, pos);
35597 0 : Py_INCREF(next_item);
35598 : } else
35599 : #endif
35600 : {
35601 0 : next_item = PyIter_Next(iter_obj);
35602 0 : if (unlikely(!next_item)) {
35603 0 : return __Pyx_IterFinish();
35604 : }
35605 : }
35606 0 : if (pitem) {
35607 0 : *pitem = next_item;
35608 0 : } else if (pkey && pvalue) {
35609 0 : if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1))
35610 0 : return -1;
35611 0 : } else if (pkey) {
35612 0 : *pkey = next_item;
35613 : } else {
35614 0 : *pvalue = next_item;
35615 : }
35616 : return 1;
35617 : }
35618 :
35619 : /* UnpackUnboundCMethod */
35620 0 : static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) {
35621 0 : PyObject *result;
35622 0 : PyObject *selfless_args = PyTuple_GetSlice(args, 1, PyTuple_Size(args));
35623 0 : if (unlikely(!selfless_args)) return NULL;
35624 0 : result = PyObject_Call(method, selfless_args, kwargs);
35625 0 : Py_DECREF(selfless_args);
35626 : return result;
35627 : }
35628 : static PyMethodDef __Pyx_UnboundCMethod_Def = {
35629 : "CythonUnboundCMethod",
35630 : __PYX_REINTERPRET_FUNCION(PyCFunction, __Pyx_SelflessCall),
35631 : METH_VARARGS | METH_KEYWORDS,
35632 : NULL
35633 : };
35634 0 : static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
35635 0 : PyObject *method;
35636 0 : method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
35637 0 : if (unlikely(!method))
35638 : return -1;
35639 0 : target->method = method;
35640 : #if CYTHON_COMPILING_IN_CPYTHON
35641 : #if PY_MAJOR_VERSION >= 3
35642 0 : if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
35643 : #else
35644 : if (likely(!__Pyx_CyOrPyCFunction_Check(method)))
35645 : #endif
35646 : {
35647 0 : PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
35648 0 : target->func = descr->d_method->ml_meth;
35649 0 : target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS);
35650 : } else
35651 : #endif
35652 : #if CYTHON_COMPILING_IN_PYPY
35653 : #else
35654 0 : if (PyCFunction_Check(method))
35655 : #endif
35656 : {
35657 0 : PyObject *self;
35658 0 : int self_found;
35659 : #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
35660 : self = PyObject_GetAttrString(method, "__self__");
35661 : if (!self) {
35662 : PyErr_Clear();
35663 : }
35664 : #else
35665 0 : self = PyCFunction_GET_SELF(method);
35666 : #endif
35667 0 : self_found = (self && self != Py_None);
35668 : #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
35669 : Py_XDECREF(self);
35670 : #endif
35671 0 : if (self_found) {
35672 0 : PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method);
35673 0 : if (unlikely(!unbound_method)) return -1;
35674 0 : Py_DECREF(method);
35675 0 : target->method = unbound_method;
35676 : }
35677 : }
35678 : return 0;
35679 : }
35680 :
35681 : /* CallUnboundCMethod0 */
35682 0 : static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
35683 0 : PyObject *args, *result = NULL;
35684 0 : if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
35685 : #if CYTHON_ASSUME_SAFE_MACROS
35686 0 : args = PyTuple_New(1);
35687 0 : if (unlikely(!args)) goto bad;
35688 0 : Py_INCREF(self);
35689 0 : PyTuple_SET_ITEM(args, 0, self);
35690 : #else
35691 : args = PyTuple_Pack(1, self);
35692 : if (unlikely(!args)) goto bad;
35693 : #endif
35694 0 : result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
35695 0 : Py_DECREF(args);
35696 : bad:
35697 : return result;
35698 : }
35699 :
35700 : /* py_dict_values */
35701 0 : static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) {
35702 0 : if (PY_MAJOR_VERSION >= 3)
35703 0 : return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyDict_Type_values, d);
35704 : else
35705 : return PyDict_Values(d);
35706 : }
35707 :
35708 : /* CallUnboundCMethod1 */
35709 : #if CYTHON_COMPILING_IN_CPYTHON
35710 : static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg) {
35711 : if (likely(cfunc->func)) {
35712 : int flag = cfunc->flag;
35713 : if (flag == METH_O) {
35714 : return (*(cfunc->func))(self, arg);
35715 : } else if ((PY_VERSION_HEX >= 0x030600B1) && flag == METH_FASTCALL) {
35716 : #if PY_VERSION_HEX >= 0x030700A0
35717 : return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, &arg, 1);
35718 : #else
35719 : return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL);
35720 : #endif
35721 : } else if ((PY_VERSION_HEX >= 0x030700A0) && flag == (METH_FASTCALL | METH_KEYWORDS)) {
35722 : return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL);
35723 : }
35724 : }
35725 : return __Pyx__CallUnboundCMethod1(cfunc, self, arg);
35726 : }
35727 : #endif
35728 : static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg){
35729 : PyObject *args, *result = NULL;
35730 : if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
35731 : #if CYTHON_COMPILING_IN_CPYTHON
35732 : if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
35733 : args = PyTuple_New(1);
35734 : if (unlikely(!args)) goto bad;
35735 : Py_INCREF(arg);
35736 : PyTuple_SET_ITEM(args, 0, arg);
35737 : if (cfunc->flag & METH_KEYWORDS)
35738 : result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL);
35739 : else
35740 : result = (*cfunc->func)(self, args);
35741 : } else {
35742 : args = PyTuple_New(2);
35743 : if (unlikely(!args)) goto bad;
35744 : Py_INCREF(self);
35745 : PyTuple_SET_ITEM(args, 0, self);
35746 : Py_INCREF(arg);
35747 : PyTuple_SET_ITEM(args, 1, arg);
35748 : result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
35749 : }
35750 : #else
35751 : args = PyTuple_Pack(2, self, arg);
35752 : if (unlikely(!args)) goto bad;
35753 : result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
35754 : #endif
35755 : bad:
35756 : Py_XDECREF(args);
35757 : return result;
35758 : }
35759 :
35760 : /* CallUnboundCMethod2 */
35761 : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1
35762 : static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) {
35763 : if (likely(cfunc->func)) {
35764 : PyObject *args[2] = {arg1, arg2};
35765 : if (cfunc->flag == METH_FASTCALL) {
35766 : #if PY_VERSION_HEX >= 0x030700A0
35767 : return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, args, 2);
35768 : #else
35769 : return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL);
35770 : #endif
35771 : }
35772 : #if PY_VERSION_HEX >= 0x030700A0
35773 : if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
35774 : return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL);
35775 : #endif
35776 : }
35777 : return __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2);
35778 : }
35779 : #endif
35780 : static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){
35781 : PyObject *args, *result = NULL;
35782 : if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
35783 : #if CYTHON_COMPILING_IN_CPYTHON
35784 : if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
35785 : args = PyTuple_New(2);
35786 : if (unlikely(!args)) goto bad;
35787 : Py_INCREF(arg1);
35788 : PyTuple_SET_ITEM(args, 0, arg1);
35789 : Py_INCREF(arg2);
35790 : PyTuple_SET_ITEM(args, 1, arg2);
35791 : if (cfunc->flag & METH_KEYWORDS)
35792 : result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL);
35793 : else
35794 : result = (*cfunc->func)(self, args);
35795 : } else {
35796 : args = PyTuple_New(3);
35797 : if (unlikely(!args)) goto bad;
35798 : Py_INCREF(self);
35799 : PyTuple_SET_ITEM(args, 0, self);
35800 : Py_INCREF(arg1);
35801 : PyTuple_SET_ITEM(args, 1, arg1);
35802 : Py_INCREF(arg2);
35803 : PyTuple_SET_ITEM(args, 2, arg2);
35804 : result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
35805 : }
35806 : #else
35807 : args = PyTuple_Pack(3, self, arg1, arg2);
35808 : if (unlikely(!args)) goto bad;
35809 : result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
35810 : #endif
35811 : bad:
35812 : Py_XDECREF(args);
35813 : return result;
35814 : }
35815 :
35816 : /* dict_getitem_default */
35817 1099 : static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) {
35818 1099 : PyObject* value;
35819 : #if PY_MAJOR_VERSION >= 3 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000)
35820 1099 : value = PyDict_GetItemWithError(d, key);
35821 1099 : if (unlikely(!value)) {
35822 0 : if (unlikely(PyErr_Occurred()))
35823 : return NULL;
35824 : value = default_value;
35825 : }
35826 1099 : Py_INCREF(value);
35827 : if ((1));
35828 : #else
35829 : if (PyString_CheckExact(key) || PyUnicode_CheckExact(key) || PyInt_CheckExact(key)) {
35830 : value = PyDict_GetItem(d, key);
35831 : if (unlikely(!value)) {
35832 : value = default_value;
35833 : }
35834 : Py_INCREF(value);
35835 : }
35836 : #endif
35837 : else {
35838 : if (default_value == Py_None)
35839 : value = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyDict_Type_get, d, key);
35840 : else
35841 : value = __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyDict_Type_get, d, key, default_value);
35842 : }
35843 : return value;
35844 : }
35845 :
35846 : /* WriteUnraisableException */
35847 0 : static void __Pyx_WriteUnraisable(const char *name, int clineno,
35848 : int lineno, const char *filename,
35849 : int full_traceback, int nogil) {
35850 0 : PyObject *old_exc, *old_val, *old_tb;
35851 0 : PyObject *ctx;
35852 0 : __Pyx_PyThreadState_declare
35853 : #ifdef WITH_THREAD
35854 0 : PyGILState_STATE state;
35855 0 : if (nogil)
35856 0 : state = PyGILState_Ensure();
35857 : else state = (PyGILState_STATE)0;
35858 : #endif
35859 0 : CYTHON_UNUSED_VAR(clineno);
35860 0 : CYTHON_UNUSED_VAR(lineno);
35861 0 : CYTHON_UNUSED_VAR(filename);
35862 0 : CYTHON_MAYBE_UNUSED_VAR(nogil);
35863 0 : __Pyx_PyThreadState_assign
35864 0 : __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
35865 0 : if (full_traceback) {
35866 0 : Py_XINCREF(old_exc);
35867 0 : Py_XINCREF(old_val);
35868 0 : Py_XINCREF(old_tb);
35869 0 : __Pyx_ErrRestore(old_exc, old_val, old_tb);
35870 0 : PyErr_PrintEx(0);
35871 : }
35872 : #if PY_MAJOR_VERSION < 3
35873 : ctx = PyString_FromString(name);
35874 : #else
35875 0 : ctx = PyUnicode_FromString(name);
35876 : #endif
35877 0 : __Pyx_ErrRestore(old_exc, old_val, old_tb);
35878 0 : if (!ctx) {
35879 0 : PyErr_WriteUnraisable(Py_None);
35880 : } else {
35881 0 : PyErr_WriteUnraisable(ctx);
35882 0 : Py_DECREF(ctx);
35883 : }
35884 : #ifdef WITH_THREAD
35885 0 : if (nogil)
35886 0 : PyGILState_Release(state);
35887 : #endif
35888 0 : }
35889 :
35890 : /* PyObject_GenericGetAttrNoDict */
35891 : #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
35892 : static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
35893 : __Pyx_TypeName type_name = __Pyx_PyType_GetName(tp);
35894 : PyErr_Format(PyExc_AttributeError,
35895 : #if PY_MAJOR_VERSION >= 3
35896 : "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'",
35897 : type_name, attr_name);
35898 : #else
35899 : "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'",
35900 : type_name, PyString_AS_STRING(attr_name));
35901 : #endif
35902 : __Pyx_DECREF_TypeName(type_name);
35903 : return NULL;
35904 : }
35905 : static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
35906 : PyObject *descr;
35907 : PyTypeObject *tp = Py_TYPE(obj);
35908 : if (unlikely(!PyString_Check(attr_name))) {
35909 : return PyObject_GenericGetAttr(obj, attr_name);
35910 : }
35911 : assert(!tp->tp_dictoffset);
35912 : descr = _PyType_Lookup(tp, attr_name);
35913 : if (unlikely(!descr)) {
35914 : return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
35915 : }
35916 : Py_INCREF(descr);
35917 : #if PY_MAJOR_VERSION < 3
35918 : if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
35919 : #endif
35920 : {
35921 : descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
35922 : if (unlikely(f)) {
35923 : PyObject *res = f(descr, obj, (PyObject *)tp);
35924 : Py_DECREF(descr);
35925 : return res;
35926 : }
35927 : }
35928 : return descr;
35929 : }
35930 : #endif
35931 :
35932 : /* PyObject_GenericGetAttr */
35933 : #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
35934 : static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
35935 : if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
35936 : return PyObject_GenericGetAttr(obj, attr_name);
35937 : }
35938 : return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
35939 : }
35940 : #endif
35941 :
35942 : /* FixUpExtensionType */
35943 : #if CYTHON_USE_TYPE_SPECS
35944 : static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) {
35945 : #if PY_VERSION_HEX > 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
35946 : CYTHON_UNUSED_VAR(spec);
35947 : CYTHON_UNUSED_VAR(type);
35948 : #else
35949 : const PyType_Slot *slot = spec->slots;
35950 : while (slot && slot->slot && slot->slot != Py_tp_members)
35951 : slot++;
35952 : if (slot && slot->slot == Py_tp_members) {
35953 : int changed = 0;
35954 : #if !(PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON)
35955 : const
35956 : #endif
35957 : PyMemberDef *memb = (PyMemberDef*) slot->pfunc;
35958 : while (memb && memb->name) {
35959 : if (memb->name[0] == '_' && memb->name[1] == '_') {
35960 : #if PY_VERSION_HEX < 0x030900b1
35961 : if (strcmp(memb->name, "__weaklistoffset__") == 0) {
35962 : assert(memb->type == T_PYSSIZET);
35963 : assert(memb->flags == READONLY);
35964 : type->tp_weaklistoffset = memb->offset;
35965 : changed = 1;
35966 : }
35967 : else if (strcmp(memb->name, "__dictoffset__") == 0) {
35968 : assert(memb->type == T_PYSSIZET);
35969 : assert(memb->flags == READONLY);
35970 : type->tp_dictoffset = memb->offset;
35971 : changed = 1;
35972 : }
35973 : #if CYTHON_METH_FASTCALL
35974 : else if (strcmp(memb->name, "__vectorcalloffset__") == 0) {
35975 : assert(memb->type == T_PYSSIZET);
35976 : assert(memb->flags == READONLY);
35977 : #if PY_VERSION_HEX >= 0x030800b4
35978 : type->tp_vectorcall_offset = memb->offset;
35979 : #else
35980 : type->tp_print = (printfunc) memb->offset;
35981 : #endif
35982 : changed = 1;
35983 : }
35984 : #endif
35985 : #else
35986 : if ((0));
35987 : #endif
35988 : #if PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON
35989 : else if (strcmp(memb->name, "__module__") == 0) {
35990 : PyObject *descr;
35991 : assert(memb->type == T_OBJECT);
35992 : assert(memb->flags == 0 || memb->flags == READONLY);
35993 : descr = PyDescr_NewMember(type, memb);
35994 : if (unlikely(!descr))
35995 : return -1;
35996 : if (unlikely(PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr) < 0)) {
35997 : Py_DECREF(descr);
35998 : return -1;
35999 : }
36000 : Py_DECREF(descr);
36001 : changed = 1;
36002 : }
36003 : #endif
36004 : }
36005 : memb++;
36006 : }
36007 : if (changed)
36008 : PyType_Modified(type);
36009 : }
36010 : #endif
36011 : return 0;
36012 : }
36013 : #endif
36014 :
36015 : /* ValidateBasesTuple */
36016 : #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS
36017 0 : static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) {
36018 0 : Py_ssize_t i, n;
36019 : #if CYTHON_ASSUME_SAFE_MACROS
36020 0 : n = PyTuple_GET_SIZE(bases);
36021 : #else
36022 : n = PyTuple_Size(bases);
36023 : if (n < 0) return -1;
36024 : #endif
36025 0 : for (i = 1; i < n; i++)
36026 : {
36027 : #if CYTHON_AVOID_BORROWED_REFS
36028 : PyObject *b0 = PySequence_GetItem(bases, i);
36029 : if (!b0) return -1;
36030 : #elif CYTHON_ASSUME_SAFE_MACROS
36031 0 : PyObject *b0 = PyTuple_GET_ITEM(bases, i);
36032 : #else
36033 : PyObject *b0 = PyTuple_GetItem(bases, i);
36034 : if (!b0) return -1;
36035 : #endif
36036 0 : PyTypeObject *b;
36037 : #if PY_MAJOR_VERSION < 3
36038 : if (PyClass_Check(b0))
36039 : {
36040 : PyErr_Format(PyExc_TypeError, "base class '%.200s' is an old-style class",
36041 : PyString_AS_STRING(((PyClassObject*)b0)->cl_name));
36042 : #if CYTHON_AVOID_BORROWED_REFS
36043 : Py_DECREF(b0);
36044 : #endif
36045 : return -1;
36046 : }
36047 : #endif
36048 0 : b = (PyTypeObject*) b0;
36049 0 : if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE))
36050 : {
36051 0 : __Pyx_TypeName b_name = __Pyx_PyType_GetName(b);
36052 0 : PyErr_Format(PyExc_TypeError,
36053 : "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name);
36054 0 : __Pyx_DECREF_TypeName(b_name);
36055 : #if CYTHON_AVOID_BORROWED_REFS
36056 : Py_DECREF(b0);
36057 : #endif
36058 0 : return -1;
36059 : }
36060 0 : if (dictoffset == 0)
36061 : {
36062 0 : Py_ssize_t b_dictoffset = 0;
36063 : #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
36064 0 : b_dictoffset = b->tp_dictoffset;
36065 : #else
36066 : PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__");
36067 : if (!py_b_dictoffset) goto dictoffset_return;
36068 : b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset);
36069 : Py_DECREF(py_b_dictoffset);
36070 : if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return;
36071 : #endif
36072 0 : if (b_dictoffset) {
36073 : {
36074 0 : __Pyx_TypeName b_name = __Pyx_PyType_GetName(b);
36075 0 : PyErr_Format(PyExc_TypeError,
36076 : "extension type '%.200s' has no __dict__ slot, "
36077 : "but base type '" __Pyx_FMT_TYPENAME "' has: "
36078 : "either add 'cdef dict __dict__' to the extension type "
36079 : "or add '__slots__ = [...]' to the base type",
36080 : type_name, b_name);
36081 0 : __Pyx_DECREF_TypeName(b_name);
36082 : }
36083 : #if !(CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY)
36084 : dictoffset_return:
36085 : #endif
36086 : #if CYTHON_AVOID_BORROWED_REFS
36087 : Py_DECREF(b0);
36088 : #endif
36089 0 : return -1;
36090 : }
36091 : }
36092 : #if CYTHON_AVOID_BORROWED_REFS
36093 : Py_DECREF(b0);
36094 : #endif
36095 : }
36096 : return 0;
36097 : }
36098 : #endif
36099 :
36100 : /* PyType_Ready */
36101 12 : static int __Pyx_PyType_Ready(PyTypeObject *t) {
36102 : #if CYTHON_USE_TYPE_SPECS || !(CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API) || defined(PYSTON_MAJOR_VERSION)
36103 : (void)__Pyx_PyObject_CallMethod0;
36104 : #if CYTHON_USE_TYPE_SPECS
36105 : (void)__Pyx_validate_bases_tuple;
36106 : #endif
36107 : return PyType_Ready(t);
36108 : #else
36109 12 : int r;
36110 12 : PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*);
36111 12 : if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1))
36112 : return -1;
36113 : #if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION)
36114 : {
36115 12 : int gc_was_enabled;
36116 : #if PY_VERSION_HEX >= 0x030A00b1
36117 12 : gc_was_enabled = PyGC_Disable();
36118 12 : (void)__Pyx_PyObject_CallMethod0;
36119 : #else
36120 : PyObject *ret, *py_status;
36121 : PyObject *gc = NULL;
36122 : #if PY_VERSION_HEX >= 0x030700a1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400)
36123 : gc = PyImport_GetModule(__pyx_kp_u_gc);
36124 : #endif
36125 : if (unlikely(!gc)) gc = PyImport_Import(__pyx_kp_u_gc);
36126 : if (unlikely(!gc)) return -1;
36127 : py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_isenabled);
36128 : if (unlikely(!py_status)) {
36129 : Py_DECREF(gc);
36130 : return -1;
36131 : }
36132 : gc_was_enabled = __Pyx_PyObject_IsTrue(py_status);
36133 : Py_DECREF(py_status);
36134 : if (gc_was_enabled > 0) {
36135 : ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_disable);
36136 : if (unlikely(!ret)) {
36137 : Py_DECREF(gc);
36138 : return -1;
36139 : }
36140 : Py_DECREF(ret);
36141 : } else if (unlikely(gc_was_enabled == -1)) {
36142 : Py_DECREF(gc);
36143 : return -1;
36144 : }
36145 : #endif
36146 12 : t->tp_flags |= Py_TPFLAGS_HEAPTYPE;
36147 : #if PY_VERSION_HEX >= 0x030A0000
36148 12 : t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE;
36149 : #endif
36150 : #else
36151 : (void)__Pyx_PyObject_CallMethod0;
36152 : #endif
36153 12 : r = PyType_Ready(t);
36154 : #if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION)
36155 12 : t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE;
36156 : #if PY_VERSION_HEX >= 0x030A00b1
36157 12 : if (gc_was_enabled)
36158 12 : PyGC_Enable();
36159 : #else
36160 : if (gc_was_enabled) {
36161 : PyObject *tp, *v, *tb;
36162 : PyErr_Fetch(&tp, &v, &tb);
36163 : ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_enable);
36164 : if (likely(ret || r == -1)) {
36165 : Py_XDECREF(ret);
36166 : PyErr_Restore(tp, v, tb);
36167 : } else {
36168 : Py_XDECREF(tp);
36169 : Py_XDECREF(v);
36170 : Py_XDECREF(tb);
36171 : r = -1;
36172 : }
36173 : }
36174 : Py_DECREF(gc);
36175 : #endif
36176 : }
36177 : #endif
36178 : return r;
36179 : #endif
36180 : }
36181 :
36182 : /* SetVTable */
36183 9 : static int __Pyx_SetVtable(PyTypeObject *type, void *vtable) {
36184 9 : PyObject *ob = PyCapsule_New(vtable, 0, 0);
36185 9 : if (unlikely(!ob))
36186 0 : goto bad;
36187 : #if CYTHON_COMPILING_IN_LIMITED_API
36188 : if (unlikely(PyObject_SetAttr((PyObject *) type, __pyx_n_s_pyx_vtable, ob) < 0))
36189 : #else
36190 9 : if (unlikely(PyDict_SetItem(type->tp_dict, __pyx_n_s_pyx_vtable, ob) < 0))
36191 : #endif
36192 0 : goto bad;
36193 9 : Py_DECREF(ob);
36194 : return 0;
36195 0 : bad:
36196 0 : Py_XDECREF(ob);
36197 0 : return -1;
36198 : }
36199 :
36200 : /* GetVTable */
36201 0 : static void* __Pyx_GetVtable(PyTypeObject *type) {
36202 0 : void* ptr;
36203 : #if CYTHON_COMPILING_IN_LIMITED_API
36204 : PyObject *ob = PyObject_GetAttr((PyObject *)type, __pyx_n_s_pyx_vtable);
36205 : #else
36206 0 : PyObject *ob = PyObject_GetItem(type->tp_dict, __pyx_n_s_pyx_vtable);
36207 : #endif
36208 0 : if (!ob)
36209 0 : goto bad;
36210 0 : ptr = PyCapsule_GetPointer(ob, 0);
36211 0 : if (!ptr && !PyErr_Occurred())
36212 0 : PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type");
36213 0 : Py_DECREF(ob);
36214 : return ptr;
36215 0 : bad:
36216 0 : Py_XDECREF(ob);
36217 0 : return NULL;
36218 : }
36219 :
36220 : /* MergeVTables */
36221 : #if !CYTHON_COMPILING_IN_LIMITED_API
36222 9 : static int __Pyx_MergeVtables(PyTypeObject *type) {
36223 9 : int i;
36224 9 : void** base_vtables;
36225 9 : __Pyx_TypeName tp_base_name;
36226 9 : __Pyx_TypeName base_name;
36227 9 : void* unknown = (void*)-1;
36228 9 : PyObject* bases = type->tp_bases;
36229 9 : int base_depth = 0;
36230 : {
36231 9 : PyTypeObject* base = type->tp_base;
36232 21 : while (base) {
36233 12 : base_depth += 1;
36234 12 : base = base->tp_base;
36235 : }
36236 : }
36237 9 : base_vtables = (void**) malloc(sizeof(void*) * (size_t)(base_depth + 1));
36238 9 : base_vtables[0] = unknown;
36239 9 : for (i = 1; i < PyTuple_GET_SIZE(bases); i++) {
36240 0 : void* base_vtable = __Pyx_GetVtable(((PyTypeObject*)PyTuple_GET_ITEM(bases, i)));
36241 0 : if (base_vtable != NULL) {
36242 0 : int j;
36243 0 : PyTypeObject* base = type->tp_base;
36244 0 : for (j = 0; j < base_depth; j++) {
36245 0 : if (base_vtables[j] == unknown) {
36246 0 : base_vtables[j] = __Pyx_GetVtable(base);
36247 0 : base_vtables[j + 1] = unknown;
36248 : }
36249 0 : if (base_vtables[j] == base_vtable) {
36250 : break;
36251 0 : } else if (base_vtables[j] == NULL) {
36252 0 : goto bad;
36253 : }
36254 0 : base = base->tp_base;
36255 : }
36256 : }
36257 : }
36258 9 : PyErr_Clear();
36259 9 : free(base_vtables);
36260 9 : return 0;
36261 0 : bad:
36262 0 : tp_base_name = __Pyx_PyType_GetName(type->tp_base);
36263 0 : base_name = __Pyx_PyType_GetName((PyTypeObject*)PyTuple_GET_ITEM(bases, i));
36264 0 : PyErr_Format(PyExc_TypeError,
36265 : "multiple bases have vtable conflict: '" __Pyx_FMT_TYPENAME "' and '" __Pyx_FMT_TYPENAME "'", tp_base_name, base_name);
36266 0 : __Pyx_DECREF_TypeName(tp_base_name);
36267 0 : __Pyx_DECREF_TypeName(base_name);
36268 0 : free(base_vtables);
36269 0 : return -1;
36270 : }
36271 : #endif
36272 :
36273 : /* SetupReduce */
36274 : #if !CYTHON_COMPILING_IN_LIMITED_API
36275 6 : static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
36276 6 : int ret;
36277 6 : PyObject *name_attr;
36278 6 : name_attr = __Pyx_PyObject_GetAttrStrNoError(meth, __pyx_n_s_name_2);
36279 6 : if (likely(name_attr)) {
36280 6 : ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
36281 : } else {
36282 : ret = -1;
36283 : }
36284 6 : if (unlikely(ret < 0)) {
36285 0 : PyErr_Clear();
36286 0 : ret = 0;
36287 : }
36288 6 : Py_XDECREF(name_attr);
36289 6 : return ret;
36290 : }
36291 12 : static int __Pyx_setup_reduce(PyObject* type_obj) {
36292 12 : int ret = 0;
36293 12 : PyObject *object_reduce = NULL;
36294 12 : PyObject *object_getstate = NULL;
36295 12 : PyObject *object_reduce_ex = NULL;
36296 12 : PyObject *reduce = NULL;
36297 12 : PyObject *reduce_ex = NULL;
36298 12 : PyObject *reduce_cython = NULL;
36299 12 : PyObject *setstate = NULL;
36300 12 : PyObject *setstate_cython = NULL;
36301 12 : PyObject *getstate = NULL;
36302 : #if CYTHON_USE_PYTYPE_LOOKUP
36303 12 : getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate);
36304 : #else
36305 : getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_getstate);
36306 : if (!getstate && PyErr_Occurred()) {
36307 : goto __PYX_BAD;
36308 : }
36309 : #endif
36310 12 : if (getstate) {
36311 : #if CYTHON_USE_PYTYPE_LOOKUP
36312 12 : object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_getstate);
36313 : #else
36314 : object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_n_s_getstate);
36315 : if (!object_getstate && PyErr_Occurred()) {
36316 : goto __PYX_BAD;
36317 : }
36318 : #endif
36319 12 : if (object_getstate != getstate) {
36320 0 : goto __PYX_GOOD;
36321 : }
36322 : }
36323 : #if CYTHON_USE_PYTYPE_LOOKUP
36324 12 : object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
36325 : #else
36326 : object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
36327 : #endif
36328 12 : reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
36329 12 : if (reduce_ex == object_reduce_ex) {
36330 : #if CYTHON_USE_PYTYPE_LOOKUP
36331 12 : object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
36332 : #else
36333 : object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
36334 : #endif
36335 12 : reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
36336 12 : if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
36337 12 : reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython);
36338 12 : if (likely(reduce_cython)) {
36339 12 : ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
36340 12 : ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
36341 0 : } else if (reduce == object_reduce || PyErr_Occurred()) {
36342 0 : goto __PYX_BAD;
36343 : }
36344 12 : setstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate);
36345 12 : if (!setstate) PyErr_Clear();
36346 12 : if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
36347 12 : setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython);
36348 12 : if (likely(setstate_cython)) {
36349 12 : ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
36350 12 : ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
36351 0 : } else if (!setstate || PyErr_Occurred()) {
36352 0 : goto __PYX_BAD;
36353 : }
36354 : }
36355 12 : PyType_Modified((PyTypeObject*)type_obj);
36356 : }
36357 : }
36358 12 : goto __PYX_GOOD;
36359 0 : __PYX_BAD:
36360 0 : if (!PyErr_Occurred()) {
36361 0 : __Pyx_TypeName type_obj_name =
36362 : __Pyx_PyType_GetName((PyTypeObject*)type_obj);
36363 0 : PyErr_Format(PyExc_RuntimeError,
36364 : "Unable to initialize pickling for " __Pyx_FMT_TYPENAME, type_obj_name);
36365 : __Pyx_DECREF_TypeName(type_obj_name);
36366 : }
36367 : ret = -1;
36368 12 : __PYX_GOOD:
36369 : #if !CYTHON_USE_PYTYPE_LOOKUP
36370 : Py_XDECREF(object_reduce);
36371 : Py_XDECREF(object_reduce_ex);
36372 : Py_XDECREF(object_getstate);
36373 : Py_XDECREF(getstate);
36374 : #endif
36375 12 : Py_XDECREF(reduce);
36376 12 : Py_XDECREF(reduce_ex);
36377 12 : Py_XDECREF(reduce_cython);
36378 12 : Py_XDECREF(setstate);
36379 12 : Py_XDECREF(setstate_cython);
36380 12 : return ret;
36381 : }
36382 : #endif
36383 :
36384 : /* TypeImport */
36385 : #ifndef __PYX_HAVE_RT_ImportType_3_0_11
36386 : #define __PYX_HAVE_RT_ImportType_3_0_11
36387 48 : static PyTypeObject *__Pyx_ImportType_3_0_11(PyObject *module, const char *module_name, const char *class_name,
36388 : size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_11 check_size)
36389 : {
36390 48 : PyObject *result = 0;
36391 48 : char warning[200];
36392 48 : Py_ssize_t basicsize;
36393 48 : Py_ssize_t itemsize;
36394 : #if CYTHON_COMPILING_IN_LIMITED_API
36395 : PyObject *py_basicsize;
36396 : PyObject *py_itemsize;
36397 : #endif
36398 48 : result = PyObject_GetAttrString(module, class_name);
36399 48 : if (!result)
36400 0 : goto bad;
36401 48 : if (!PyType_Check(result)) {
36402 0 : PyErr_Format(PyExc_TypeError,
36403 : "%.200s.%.200s is not a type object",
36404 : module_name, class_name);
36405 0 : goto bad;
36406 : }
36407 : #if !CYTHON_COMPILING_IN_LIMITED_API
36408 48 : basicsize = ((PyTypeObject *)result)->tp_basicsize;
36409 48 : itemsize = ((PyTypeObject *)result)->tp_itemsize;
36410 : #else
36411 : py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
36412 : if (!py_basicsize)
36413 : goto bad;
36414 : basicsize = PyLong_AsSsize_t(py_basicsize);
36415 : Py_DECREF(py_basicsize);
36416 : py_basicsize = 0;
36417 : if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
36418 : goto bad;
36419 : py_itemsize = PyObject_GetAttrString(result, "__itemsize__");
36420 : if (!py_itemsize)
36421 : goto bad;
36422 : itemsize = PyLong_AsSsize_t(py_itemsize);
36423 : Py_DECREF(py_itemsize);
36424 : py_itemsize = 0;
36425 : if (itemsize == (Py_ssize_t)-1 && PyErr_Occurred())
36426 : goto bad;
36427 : #endif
36428 48 : if (itemsize) {
36429 3 : if (size % alignment) {
36430 0 : alignment = size % alignment;
36431 : }
36432 3 : if (itemsize < (Py_ssize_t)alignment)
36433 : itemsize = (Py_ssize_t)alignment;
36434 : }
36435 48 : if ((size_t)(basicsize + itemsize) < size) {
36436 0 : PyErr_Format(PyExc_ValueError,
36437 : "%.200s.%.200s size changed, may indicate binary incompatibility. "
36438 : "Expected %zd from C header, got %zd from PyObject",
36439 : module_name, class_name, size, basicsize+itemsize);
36440 0 : goto bad;
36441 : }
36442 48 : if (check_size == __Pyx_ImportType_CheckSize_Error_3_0_11 &&
36443 0 : ((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) {
36444 0 : PyErr_Format(PyExc_ValueError,
36445 : "%.200s.%.200s size changed, may indicate binary incompatibility. "
36446 : "Expected %zd from C header, got %zd-%zd from PyObject",
36447 : module_name, class_name, size, basicsize, basicsize+itemsize);
36448 0 : goto bad;
36449 : }
36450 48 : else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_0_11 && (size_t)basicsize > size) {
36451 0 : PyOS_snprintf(warning, sizeof(warning),
36452 : "%s.%s size changed, may indicate binary incompatibility. "
36453 : "Expected %zd from C header, got %zd from PyObject",
36454 : module_name, class_name, size, basicsize);
36455 0 : if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
36456 : }
36457 : return (PyTypeObject *)result;
36458 0 : bad:
36459 0 : Py_XDECREF(result);
36460 0 : return NULL;
36461 : }
36462 : #endif
36463 :
36464 : /* FetchSharedCythonModule */
36465 6 : static PyObject *__Pyx_FetchSharedCythonABIModule(void) {
36466 6 : return __Pyx_PyImport_AddModuleRef((char*) __PYX_ABI_MODULE_NAME);
36467 : }
36468 :
36469 : /* FetchCommonType */
36470 6 : static int __Pyx_VerifyCachedType(PyObject *cached_type,
36471 : const char *name,
36472 : Py_ssize_t basicsize,
36473 : Py_ssize_t expected_basicsize) {
36474 6 : if (!PyType_Check(cached_type)) {
36475 0 : PyErr_Format(PyExc_TypeError,
36476 : "Shared Cython type %.200s is not a type object", name);
36477 0 : return -1;
36478 : }
36479 6 : if (basicsize != expected_basicsize) {
36480 0 : PyErr_Format(PyExc_TypeError,
36481 : "Shared Cython type %.200s has the wrong size, try recompiling",
36482 : name);
36483 0 : return -1;
36484 : }
36485 : return 0;
36486 : }
36487 : #if !CYTHON_USE_TYPE_SPECS
36488 6 : static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
36489 6 : PyObject* abi_module;
36490 6 : const char* object_name;
36491 6 : PyTypeObject *cached_type = NULL;
36492 6 : abi_module = __Pyx_FetchSharedCythonABIModule();
36493 6 : if (!abi_module) return NULL;
36494 6 : object_name = strrchr(type->tp_name, '.');
36495 6 : object_name = object_name ? object_name+1 : type->tp_name;
36496 6 : cached_type = (PyTypeObject*) PyObject_GetAttrString(abi_module, object_name);
36497 6 : if (cached_type) {
36498 6 : if (__Pyx_VerifyCachedType(
36499 : (PyObject *)cached_type,
36500 : object_name,
36501 : cached_type->tp_basicsize,
36502 : type->tp_basicsize) < 0) {
36503 0 : goto bad;
36504 : }
36505 6 : goto done;
36506 : }
36507 0 : if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
36508 0 : PyErr_Clear();
36509 0 : if (PyType_Ready(type) < 0) goto bad;
36510 0 : if (PyObject_SetAttrString(abi_module, object_name, (PyObject *)type) < 0)
36511 0 : goto bad;
36512 0 : Py_INCREF(type);
36513 : cached_type = type;
36514 6 : done:
36515 6 : Py_DECREF(abi_module);
36516 : return cached_type;
36517 0 : bad:
36518 0 : Py_XDECREF(cached_type);
36519 0 : cached_type = NULL;
36520 0 : goto done;
36521 : }
36522 : #else
36523 : static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases) {
36524 : PyObject *abi_module, *cached_type = NULL;
36525 : const char* object_name = strrchr(spec->name, '.');
36526 : object_name = object_name ? object_name+1 : spec->name;
36527 : abi_module = __Pyx_FetchSharedCythonABIModule();
36528 : if (!abi_module) return NULL;
36529 : cached_type = PyObject_GetAttrString(abi_module, object_name);
36530 : if (cached_type) {
36531 : Py_ssize_t basicsize;
36532 : #if CYTHON_COMPILING_IN_LIMITED_API
36533 : PyObject *py_basicsize;
36534 : py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__");
36535 : if (unlikely(!py_basicsize)) goto bad;
36536 : basicsize = PyLong_AsSsize_t(py_basicsize);
36537 : Py_DECREF(py_basicsize);
36538 : py_basicsize = 0;
36539 : if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
36540 : #else
36541 : basicsize = likely(PyType_Check(cached_type)) ? ((PyTypeObject*) cached_type)->tp_basicsize : -1;
36542 : #endif
36543 : if (__Pyx_VerifyCachedType(
36544 : cached_type,
36545 : object_name,
36546 : basicsize,
36547 : spec->basicsize) < 0) {
36548 : goto bad;
36549 : }
36550 : goto done;
36551 : }
36552 : if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
36553 : PyErr_Clear();
36554 : CYTHON_UNUSED_VAR(module);
36555 : cached_type = __Pyx_PyType_FromModuleAndSpec(abi_module, spec, bases);
36556 : if (unlikely(!cached_type)) goto bad;
36557 : if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad;
36558 : if (PyObject_SetAttrString(abi_module, object_name, cached_type) < 0) goto bad;
36559 : done:
36560 : Py_DECREF(abi_module);
36561 : assert(cached_type == NULL || PyType_Check(cached_type));
36562 : return (PyTypeObject *) cached_type;
36563 : bad:
36564 : Py_XDECREF(cached_type);
36565 : cached_type = NULL;
36566 : goto done;
36567 : }
36568 : #endif
36569 :
36570 : /* PyVectorcallFastCallDict */
36571 : #if CYTHON_METH_FASTCALL
36572 0 : static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
36573 : {
36574 0 : PyObject *res = NULL;
36575 0 : PyObject *kwnames;
36576 0 : PyObject **newargs;
36577 0 : PyObject **kwvalues;
36578 0 : Py_ssize_t i, pos;
36579 0 : size_t j;
36580 0 : PyObject *key, *value;
36581 0 : unsigned long keys_are_strings;
36582 0 : Py_ssize_t nkw = PyDict_GET_SIZE(kw);
36583 0 : newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0]));
36584 0 : if (unlikely(newargs == NULL)) {
36585 0 : PyErr_NoMemory();
36586 0 : return NULL;
36587 : }
36588 0 : for (j = 0; j < nargs; j++) newargs[j] = args[j];
36589 0 : kwnames = PyTuple_New(nkw);
36590 0 : if (unlikely(kwnames == NULL)) {
36591 0 : PyMem_Free(newargs);
36592 0 : return NULL;
36593 : }
36594 0 : kwvalues = newargs + nargs;
36595 0 : pos = i = 0;
36596 0 : keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS;
36597 0 : while (PyDict_Next(kw, &pos, &key, &value)) {
36598 0 : keys_are_strings &= Py_TYPE(key)->tp_flags;
36599 0 : Py_INCREF(key);
36600 0 : Py_INCREF(value);
36601 0 : PyTuple_SET_ITEM(kwnames, i, key);
36602 0 : kwvalues[i] = value;
36603 0 : i++;
36604 : }
36605 0 : if (unlikely(!keys_are_strings)) {
36606 0 : PyErr_SetString(PyExc_TypeError, "keywords must be strings");
36607 0 : goto cleanup;
36608 : }
36609 0 : res = vc(func, newargs, nargs, kwnames);
36610 0 : cleanup:
36611 0 : Py_DECREF(kwnames);
36612 0 : for (i = 0; i < nkw; i++)
36613 0 : Py_DECREF(kwvalues[i]);
36614 0 : PyMem_Free(newargs);
36615 0 : return res;
36616 : }
36617 0 : static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
36618 : {
36619 0 : if (likely(kw == NULL) || PyDict_GET_SIZE(kw) == 0) {
36620 0 : return vc(func, args, nargs, NULL);
36621 : }
36622 0 : return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw);
36623 : }
36624 : #endif
36625 :
36626 : /* CythonFunctionShared */
36627 : #if CYTHON_COMPILING_IN_LIMITED_API
36628 : static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc) {
36629 : if (__Pyx_CyFunction_Check(func)) {
36630 : return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc;
36631 : } else if (PyCFunction_Check(func)) {
36632 : return PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
36633 : }
36634 : return 0;
36635 : }
36636 : #else
36637 : static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc) {
36638 : return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
36639 : }
36640 : #endif
36641 0 : static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) {
36642 : #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
36643 : __Pyx_Py_XDECREF_SET(
36644 : __Pyx_CyFunction_GetClassObj(f),
36645 : ((classobj) ? __Pyx_NewRef(classobj) : NULL));
36646 : #else
36647 0 : __Pyx_Py_XDECREF_SET(
36648 : ((PyCMethodObject *) (f))->mm_class,
36649 : (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL));
36650 : #endif
36651 0 : }
36652 : static PyObject *
36653 0 : __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure)
36654 : {
36655 0 : CYTHON_UNUSED_VAR(closure);
36656 0 : if (unlikely(op->func_doc == NULL)) {
36657 : #if CYTHON_COMPILING_IN_LIMITED_API
36658 : op->func_doc = PyObject_GetAttrString(op->func, "__doc__");
36659 : if (unlikely(!op->func_doc)) return NULL;
36660 : #else
36661 0 : if (((PyCFunctionObject*)op)->m_ml->ml_doc) {
36662 : #if PY_MAJOR_VERSION >= 3
36663 0 : op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc);
36664 : #else
36665 : op->func_doc = PyString_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc);
36666 : #endif
36667 0 : if (unlikely(op->func_doc == NULL))
36668 : return NULL;
36669 : } else {
36670 0 : Py_INCREF(Py_None);
36671 0 : return Py_None;
36672 : }
36673 : #endif
36674 : }
36675 0 : Py_INCREF(op->func_doc);
36676 : return op->func_doc;
36677 : }
36678 : static int
36679 0 : __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context)
36680 : {
36681 0 : CYTHON_UNUSED_VAR(context);
36682 0 : if (value == NULL) {
36683 0 : value = Py_None;
36684 : }
36685 0 : Py_INCREF(value);
36686 0 : __Pyx_Py_XDECREF_SET(op->func_doc, value);
36687 0 : return 0;
36688 : }
36689 : static PyObject *
36690 0 : __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context)
36691 : {
36692 0 : CYTHON_UNUSED_VAR(context);
36693 0 : if (unlikely(op->func_name == NULL)) {
36694 : #if CYTHON_COMPILING_IN_LIMITED_API
36695 : op->func_name = PyObject_GetAttrString(op->func, "__name__");
36696 : #elif PY_MAJOR_VERSION >= 3
36697 0 : op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name);
36698 : #else
36699 : op->func_name = PyString_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name);
36700 : #endif
36701 0 : if (unlikely(op->func_name == NULL))
36702 : return NULL;
36703 : }
36704 0 : Py_INCREF(op->func_name);
36705 : return op->func_name;
36706 : }
36707 : static int
36708 0 : __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context)
36709 : {
36710 0 : CYTHON_UNUSED_VAR(context);
36711 : #if PY_MAJOR_VERSION >= 3
36712 0 : if (unlikely(value == NULL || !PyUnicode_Check(value)))
36713 : #else
36714 : if (unlikely(value == NULL || !PyString_Check(value)))
36715 : #endif
36716 : {
36717 0 : PyErr_SetString(PyExc_TypeError,
36718 : "__name__ must be set to a string object");
36719 0 : return -1;
36720 : }
36721 0 : Py_INCREF(value);
36722 0 : __Pyx_Py_XDECREF_SET(op->func_name, value);
36723 0 : return 0;
36724 : }
36725 : static PyObject *
36726 0 : __Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context)
36727 : {
36728 0 : CYTHON_UNUSED_VAR(context);
36729 0 : Py_INCREF(op->func_qualname);
36730 0 : return op->func_qualname;
36731 : }
36732 : static int
36733 0 : __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context)
36734 : {
36735 0 : CYTHON_UNUSED_VAR(context);
36736 : #if PY_MAJOR_VERSION >= 3
36737 0 : if (unlikely(value == NULL || !PyUnicode_Check(value)))
36738 : #else
36739 : if (unlikely(value == NULL || !PyString_Check(value)))
36740 : #endif
36741 : {
36742 0 : PyErr_SetString(PyExc_TypeError,
36743 : "__qualname__ must be set to a string object");
36744 0 : return -1;
36745 : }
36746 0 : Py_INCREF(value);
36747 0 : __Pyx_Py_XDECREF_SET(op->func_qualname, value);
36748 0 : return 0;
36749 : }
36750 : static PyObject *
36751 0 : __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context)
36752 : {
36753 0 : CYTHON_UNUSED_VAR(context);
36754 0 : if (unlikely(op->func_dict == NULL)) {
36755 0 : op->func_dict = PyDict_New();
36756 0 : if (unlikely(op->func_dict == NULL))
36757 : return NULL;
36758 : }
36759 0 : Py_INCREF(op->func_dict);
36760 : return op->func_dict;
36761 : }
36762 : static int
36763 0 : __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, void *context)
36764 : {
36765 0 : CYTHON_UNUSED_VAR(context);
36766 0 : if (unlikely(value == NULL)) {
36767 0 : PyErr_SetString(PyExc_TypeError,
36768 : "function's dictionary may not be deleted");
36769 0 : return -1;
36770 : }
36771 0 : if (unlikely(!PyDict_Check(value))) {
36772 0 : PyErr_SetString(PyExc_TypeError,
36773 : "setting function's dictionary to a non-dict");
36774 0 : return -1;
36775 : }
36776 0 : Py_INCREF(value);
36777 0 : __Pyx_Py_XDECREF_SET(op->func_dict, value);
36778 0 : return 0;
36779 : }
36780 : static PyObject *
36781 0 : __Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context)
36782 : {
36783 0 : CYTHON_UNUSED_VAR(context);
36784 0 : Py_INCREF(op->func_globals);
36785 0 : return op->func_globals;
36786 : }
36787 : static PyObject *
36788 0 : __Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context)
36789 : {
36790 0 : CYTHON_UNUSED_VAR(op);
36791 0 : CYTHON_UNUSED_VAR(context);
36792 0 : Py_INCREF(Py_None);
36793 0 : return Py_None;
36794 : }
36795 : static PyObject *
36796 0 : __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context)
36797 : {
36798 0 : PyObject* result = (op->func_code) ? op->func_code : Py_None;
36799 0 : CYTHON_UNUSED_VAR(context);
36800 0 : Py_INCREF(result);
36801 0 : return result;
36802 : }
36803 : static int
36804 0 : __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
36805 0 : int result = 0;
36806 0 : PyObject *res = op->defaults_getter((PyObject *) op);
36807 0 : if (unlikely(!res))
36808 : return -1;
36809 : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
36810 0 : op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
36811 0 : Py_INCREF(op->defaults_tuple);
36812 0 : op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
36813 0 : Py_INCREF(op->defaults_kwdict);
36814 : #else
36815 : op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0);
36816 : if (unlikely(!op->defaults_tuple)) result = -1;
36817 : else {
36818 : op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1);
36819 : if (unlikely(!op->defaults_kwdict)) result = -1;
36820 : }
36821 : #endif
36822 0 : Py_DECREF(res);
36823 : return result;
36824 : }
36825 : static int
36826 0 : __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
36827 0 : CYTHON_UNUSED_VAR(context);
36828 0 : if (!value) {
36829 : value = Py_None;
36830 0 : } else if (unlikely(value != Py_None && !PyTuple_Check(value))) {
36831 0 : PyErr_SetString(PyExc_TypeError,
36832 : "__defaults__ must be set to a tuple object");
36833 0 : return -1;
36834 : }
36835 0 : PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not "
36836 : "currently affect the values used in function calls", 1);
36837 0 : Py_INCREF(value);
36838 0 : __Pyx_Py_XDECREF_SET(op->defaults_tuple, value);
36839 0 : return 0;
36840 : }
36841 : static PyObject *
36842 0 : __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) {
36843 0 : PyObject* result = op->defaults_tuple;
36844 0 : CYTHON_UNUSED_VAR(context);
36845 0 : if (unlikely(!result)) {
36846 0 : if (op->defaults_getter) {
36847 0 : if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
36848 0 : result = op->defaults_tuple;
36849 : } else {
36850 : result = Py_None;
36851 : }
36852 : }
36853 0 : Py_INCREF(result);
36854 : return result;
36855 : }
36856 : static int
36857 0 : __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
36858 0 : CYTHON_UNUSED_VAR(context);
36859 0 : if (!value) {
36860 : value = Py_None;
36861 0 : } else if (unlikely(value != Py_None && !PyDict_Check(value))) {
36862 0 : PyErr_SetString(PyExc_TypeError,
36863 : "__kwdefaults__ must be set to a dict object");
36864 0 : return -1;
36865 : }
36866 0 : PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not "
36867 : "currently affect the values used in function calls", 1);
36868 0 : Py_INCREF(value);
36869 0 : __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value);
36870 0 : return 0;
36871 : }
36872 : static PyObject *
36873 0 : __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) {
36874 0 : PyObject* result = op->defaults_kwdict;
36875 0 : CYTHON_UNUSED_VAR(context);
36876 0 : if (unlikely(!result)) {
36877 0 : if (op->defaults_getter) {
36878 0 : if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
36879 0 : result = op->defaults_kwdict;
36880 : } else {
36881 : result = Py_None;
36882 : }
36883 : }
36884 0 : Py_INCREF(result);
36885 : return result;
36886 : }
36887 : static int
36888 0 : __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
36889 0 : CYTHON_UNUSED_VAR(context);
36890 0 : if (!value || value == Py_None) {
36891 : value = NULL;
36892 0 : } else if (unlikely(!PyDict_Check(value))) {
36893 0 : PyErr_SetString(PyExc_TypeError,
36894 : "__annotations__ must be set to a dict object");
36895 0 : return -1;
36896 : }
36897 0 : Py_XINCREF(value);
36898 0 : __Pyx_Py_XDECREF_SET(op->func_annotations, value);
36899 0 : return 0;
36900 : }
36901 : static PyObject *
36902 0 : __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) {
36903 0 : PyObject* result = op->func_annotations;
36904 0 : CYTHON_UNUSED_VAR(context);
36905 0 : if (unlikely(!result)) {
36906 0 : result = PyDict_New();
36907 0 : if (unlikely(!result)) return NULL;
36908 0 : op->func_annotations = result;
36909 : }
36910 0 : Py_INCREF(result);
36911 : return result;
36912 : }
36913 : static PyObject *
36914 0 : __Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) {
36915 0 : int is_coroutine;
36916 0 : CYTHON_UNUSED_VAR(context);
36917 0 : if (op->func_is_coroutine) {
36918 0 : return __Pyx_NewRef(op->func_is_coroutine);
36919 : }
36920 0 : is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE;
36921 : #if PY_VERSION_HEX >= 0x03050000
36922 0 : if (is_coroutine) {
36923 0 : PyObject *module, *fromlist, *marker = __pyx_n_s_is_coroutine;
36924 0 : fromlist = PyList_New(1);
36925 0 : if (unlikely(!fromlist)) return NULL;
36926 0 : Py_INCREF(marker);
36927 : #if CYTHON_ASSUME_SAFE_MACROS
36928 0 : PyList_SET_ITEM(fromlist, 0, marker);
36929 : #else
36930 : if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) {
36931 : Py_DECREF(marker);
36932 : Py_DECREF(fromlist);
36933 : return NULL;
36934 : }
36935 : #endif
36936 0 : module = PyImport_ImportModuleLevelObject(__pyx_n_s_asyncio_coroutines, NULL, NULL, fromlist, 0);
36937 0 : Py_DECREF(fromlist);
36938 0 : if (unlikely(!module)) goto ignore;
36939 0 : op->func_is_coroutine = __Pyx_PyObject_GetAttrStr(module, marker);
36940 0 : Py_DECREF(module);
36941 0 : if (likely(op->func_is_coroutine)) {
36942 0 : return __Pyx_NewRef(op->func_is_coroutine);
36943 : }
36944 0 : ignore:
36945 0 : PyErr_Clear();
36946 : }
36947 : #endif
36948 0 : op->func_is_coroutine = __Pyx_PyBool_FromLong(is_coroutine);
36949 0 : return __Pyx_NewRef(op->func_is_coroutine);
36950 : }
36951 : #if CYTHON_COMPILING_IN_LIMITED_API
36952 : static PyObject *
36953 : __Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) {
36954 : CYTHON_UNUSED_VAR(context);
36955 : return PyObject_GetAttrString(op->func, "__module__");
36956 : }
36957 : static int
36958 : __Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
36959 : CYTHON_UNUSED_VAR(context);
36960 : return PyObject_SetAttrString(op->func, "__module__", value);
36961 : }
36962 : #endif
36963 : static PyGetSetDef __pyx_CyFunction_getsets[] = {
36964 : {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
36965 : {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
36966 : {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
36967 : {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
36968 : {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
36969 : {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
36970 : {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
36971 : {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
36972 : {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
36973 : {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
36974 : {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
36975 : {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
36976 : {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
36977 : {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
36978 : {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
36979 : {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
36980 : {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
36981 : {(char *) "_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0},
36982 : #if CYTHON_COMPILING_IN_LIMITED_API
36983 : {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0},
36984 : #endif
36985 : {0, 0, 0, 0, 0}
36986 : };
36987 : static PyMemberDef __pyx_CyFunction_members[] = {
36988 : #if !CYTHON_COMPILING_IN_LIMITED_API
36989 : {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0},
36990 : #endif
36991 : #if CYTHON_USE_TYPE_SPECS
36992 : {(char *) "__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0},
36993 : #if CYTHON_METH_FASTCALL
36994 : #if CYTHON_BACKPORT_VECTORCALL
36995 : {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0},
36996 : #else
36997 : #if !CYTHON_COMPILING_IN_LIMITED_API
36998 : {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0},
36999 : #endif
37000 : #endif
37001 : #endif
37002 : #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API
37003 : {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0},
37004 : #else
37005 : {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0},
37006 : #endif
37007 : #endif
37008 : {0, 0, 0, 0, 0}
37009 : };
37010 : static PyObject *
37011 0 : __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args)
37012 : {
37013 0 : CYTHON_UNUSED_VAR(args);
37014 : #if PY_MAJOR_VERSION >= 3
37015 0 : Py_INCREF(m->func_qualname);
37016 0 : return m->func_qualname;
37017 : #else
37018 : return PyString_FromString(((PyCFunctionObject*)m)->m_ml->ml_name);
37019 : #endif
37020 : }
37021 : static PyMethodDef __pyx_CyFunction_methods[] = {
37022 : {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
37023 : {0, 0, 0, 0}
37024 : };
37025 : #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API
37026 : #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
37027 : #else
37028 : #define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist)
37029 : #endif
37030 69 : static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname,
37031 : PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
37032 : #if !CYTHON_COMPILING_IN_LIMITED_API
37033 69 : PyCFunctionObject *cf = (PyCFunctionObject*) op;
37034 : #endif
37035 69 : if (unlikely(op == NULL))
37036 : return NULL;
37037 : #if CYTHON_COMPILING_IN_LIMITED_API
37038 : op->func = PyCFunction_NewEx(ml, (PyObject*)op, module);
37039 : if (unlikely(!op->func)) return NULL;
37040 : #endif
37041 69 : op->flags = flags;
37042 69 : __Pyx_CyFunction_weakreflist(op) = NULL;
37043 : #if !CYTHON_COMPILING_IN_LIMITED_API
37044 69 : cf->m_ml = ml;
37045 69 : cf->m_self = (PyObject *) op;
37046 : #endif
37047 69 : Py_XINCREF(closure);
37048 69 : op->func_closure = closure;
37049 : #if !CYTHON_COMPILING_IN_LIMITED_API
37050 69 : Py_XINCREF(module);
37051 69 : cf->m_module = module;
37052 : #endif
37053 69 : op->func_dict = NULL;
37054 69 : op->func_name = NULL;
37055 69 : Py_INCREF(qualname);
37056 69 : op->func_qualname = qualname;
37057 69 : op->func_doc = NULL;
37058 : #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
37059 : op->func_classobj = NULL;
37060 : #else
37061 69 : ((PyCMethodObject*)op)->mm_class = NULL;
37062 : #endif
37063 69 : op->func_globals = globals;
37064 69 : Py_INCREF(op->func_globals);
37065 69 : Py_XINCREF(code);
37066 69 : op->func_code = code;
37067 69 : op->defaults_pyobjects = 0;
37068 69 : op->defaults_size = 0;
37069 69 : op->defaults = NULL;
37070 69 : op->defaults_tuple = NULL;
37071 69 : op->defaults_kwdict = NULL;
37072 69 : op->defaults_getter = NULL;
37073 69 : op->func_annotations = NULL;
37074 69 : op->func_is_coroutine = NULL;
37075 : #if CYTHON_METH_FASTCALL
37076 69 : switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) {
37077 0 : case METH_NOARGS:
37078 0 : __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS;
37079 0 : break;
37080 0 : case METH_O:
37081 0 : __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O;
37082 0 : break;
37083 0 : case METH_METHOD | METH_FASTCALL | METH_KEYWORDS:
37084 0 : __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD;
37085 0 : break;
37086 15 : case METH_FASTCALL | METH_KEYWORDS:
37087 15 : __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS;
37088 15 : break;
37089 54 : case METH_VARARGS | METH_KEYWORDS:
37090 54 : __Pyx_CyFunction_func_vectorcall(op) = NULL;
37091 54 : break;
37092 0 : default:
37093 0 : PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
37094 0 : Py_DECREF(op);
37095 : return NULL;
37096 : }
37097 : #endif
37098 : return (PyObject *) op;
37099 : }
37100 : static int
37101 0 : __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
37102 : {
37103 0 : Py_CLEAR(m->func_closure);
37104 : #if CYTHON_COMPILING_IN_LIMITED_API
37105 : Py_CLEAR(m->func);
37106 : #else
37107 0 : Py_CLEAR(((PyCFunctionObject*)m)->m_module);
37108 : #endif
37109 0 : Py_CLEAR(m->func_dict);
37110 0 : Py_CLEAR(m->func_name);
37111 0 : Py_CLEAR(m->func_qualname);
37112 0 : Py_CLEAR(m->func_doc);
37113 0 : Py_CLEAR(m->func_globals);
37114 0 : Py_CLEAR(m->func_code);
37115 : #if !CYTHON_COMPILING_IN_LIMITED_API
37116 : #if PY_VERSION_HEX < 0x030900B1
37117 : Py_CLEAR(__Pyx_CyFunction_GetClassObj(m));
37118 : #else
37119 : {
37120 0 : PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class;
37121 0 : ((PyCMethodObject *) (m))->mm_class = NULL;
37122 0 : Py_XDECREF(cls);
37123 : }
37124 : #endif
37125 : #endif
37126 0 : Py_CLEAR(m->defaults_tuple);
37127 0 : Py_CLEAR(m->defaults_kwdict);
37128 0 : Py_CLEAR(m->func_annotations);
37129 0 : Py_CLEAR(m->func_is_coroutine);
37130 0 : if (m->defaults) {
37131 : PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
37132 : int i;
37133 0 : for (i = 0; i < m->defaults_pyobjects; i++)
37134 0 : Py_XDECREF(pydefaults[i]);
37135 0 : PyObject_Free(m->defaults);
37136 0 : m->defaults = NULL;
37137 : }
37138 0 : return 0;
37139 : }
37140 0 : static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
37141 : {
37142 0 : if (__Pyx_CyFunction_weakreflist(m) != NULL)
37143 0 : PyObject_ClearWeakRefs((PyObject *) m);
37144 0 : __Pyx_CyFunction_clear(m);
37145 0 : __Pyx_PyHeapTypeObject_GC_Del(m);
37146 0 : }
37147 0 : static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
37148 : {
37149 0 : PyObject_GC_UnTrack(m);
37150 0 : __Pyx__CyFunction_dealloc(m);
37151 0 : }
37152 0 : static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
37153 : {
37154 0 : Py_VISIT(m->func_closure);
37155 : #if CYTHON_COMPILING_IN_LIMITED_API
37156 : Py_VISIT(m->func);
37157 : #else
37158 0 : Py_VISIT(((PyCFunctionObject*)m)->m_module);
37159 : #endif
37160 0 : Py_VISIT(m->func_dict);
37161 0 : Py_VISIT(m->func_name);
37162 0 : Py_VISIT(m->func_qualname);
37163 0 : Py_VISIT(m->func_doc);
37164 0 : Py_VISIT(m->func_globals);
37165 0 : Py_VISIT(m->func_code);
37166 : #if !CYTHON_COMPILING_IN_LIMITED_API
37167 0 : Py_VISIT(__Pyx_CyFunction_GetClassObj(m));
37168 : #endif
37169 0 : Py_VISIT(m->defaults_tuple);
37170 0 : Py_VISIT(m->defaults_kwdict);
37171 0 : Py_VISIT(m->func_is_coroutine);
37172 0 : if (m->defaults) {
37173 : PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
37174 : int i;
37175 0 : for (i = 0; i < m->defaults_pyobjects; i++)
37176 0 : Py_VISIT(pydefaults[i]);
37177 : }
37178 : return 0;
37179 : }
37180 : static PyObject*
37181 0 : __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
37182 : {
37183 : #if PY_MAJOR_VERSION >= 3
37184 0 : return PyUnicode_FromFormat("<cyfunction %U at %p>",
37185 : op->func_qualname, (void *)op);
37186 : #else
37187 : return PyString_FromFormat("<cyfunction %s at %p>",
37188 : PyString_AsString(op->func_qualname), (void *)op);
37189 : #endif
37190 : }
37191 0 : static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
37192 : #if CYTHON_COMPILING_IN_LIMITED_API
37193 : PyObject *f = ((__pyx_CyFunctionObject*)func)->func;
37194 : PyObject *py_name = NULL;
37195 : PyCFunction meth;
37196 : int flags;
37197 : meth = PyCFunction_GetFunction(f);
37198 : if (unlikely(!meth)) return NULL;
37199 : flags = PyCFunction_GetFlags(f);
37200 : if (unlikely(flags < 0)) return NULL;
37201 : #else
37202 0 : PyCFunctionObject* f = (PyCFunctionObject*)func;
37203 0 : PyCFunction meth = f->m_ml->ml_meth;
37204 0 : int flags = f->m_ml->ml_flags;
37205 : #endif
37206 0 : Py_ssize_t size;
37207 0 : switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
37208 0 : case METH_VARARGS:
37209 0 : if (likely(kw == NULL || PyDict_Size(kw) == 0))
37210 0 : return (*meth)(self, arg);
37211 : break;
37212 0 : case METH_VARARGS | METH_KEYWORDS:
37213 0 : return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw);
37214 0 : case METH_NOARGS:
37215 0 : if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
37216 : #if CYTHON_ASSUME_SAFE_MACROS
37217 0 : size = PyTuple_GET_SIZE(arg);
37218 : #else
37219 : size = PyTuple_Size(arg);
37220 : if (unlikely(size < 0)) return NULL;
37221 : #endif
37222 0 : if (likely(size == 0))
37223 0 : return (*meth)(self, NULL);
37224 : #if CYTHON_COMPILING_IN_LIMITED_API
37225 : py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL);
37226 : if (!py_name) return NULL;
37227 : PyErr_Format(PyExc_TypeError,
37228 : "%.200S() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
37229 : py_name, size);
37230 : Py_DECREF(py_name);
37231 : #else
37232 0 : PyErr_Format(PyExc_TypeError,
37233 : "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
37234 0 : f->m_ml->ml_name, size);
37235 : #endif
37236 0 : return NULL;
37237 : }
37238 : break;
37239 0 : case METH_O:
37240 0 : if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
37241 : #if CYTHON_ASSUME_SAFE_MACROS
37242 0 : size = PyTuple_GET_SIZE(arg);
37243 : #else
37244 : size = PyTuple_Size(arg);
37245 : if (unlikely(size < 0)) return NULL;
37246 : #endif
37247 0 : if (likely(size == 1)) {
37248 0 : PyObject *result, *arg0;
37249 : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
37250 0 : arg0 = PyTuple_GET_ITEM(arg, 0);
37251 : #else
37252 : arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
37253 : #endif
37254 0 : result = (*meth)(self, arg0);
37255 : #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
37256 : Py_DECREF(arg0);
37257 : #endif
37258 0 : return result;
37259 : }
37260 : #if CYTHON_COMPILING_IN_LIMITED_API
37261 : py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL);
37262 : if (!py_name) return NULL;
37263 : PyErr_Format(PyExc_TypeError,
37264 : "%.200S() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
37265 : py_name, size);
37266 : Py_DECREF(py_name);
37267 : #else
37268 0 : PyErr_Format(PyExc_TypeError,
37269 : "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
37270 0 : f->m_ml->ml_name, size);
37271 : #endif
37272 0 : return NULL;
37273 : }
37274 : break;
37275 0 : default:
37276 0 : PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
37277 0 : return NULL;
37278 : }
37279 : #if CYTHON_COMPILING_IN_LIMITED_API
37280 : py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL);
37281 : if (!py_name) return NULL;
37282 : PyErr_Format(PyExc_TypeError, "%.200S() takes no keyword arguments",
37283 : py_name);
37284 : Py_DECREF(py_name);
37285 : #else
37286 0 : PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
37287 0 : f->m_ml->ml_name);
37288 : #endif
37289 0 : return NULL;
37290 : }
37291 0 : static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
37292 0 : PyObject *self, *result;
37293 : #if CYTHON_COMPILING_IN_LIMITED_API
37294 : self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func);
37295 : if (unlikely(!self) && PyErr_Occurred()) return NULL;
37296 : #else
37297 0 : self = ((PyCFunctionObject*)func)->m_self;
37298 : #endif
37299 0 : result = __Pyx_CyFunction_CallMethod(func, self, arg, kw);
37300 0 : return result;
37301 : }
37302 0 : static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
37303 0 : PyObject *result;
37304 0 : __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
37305 : #if CYTHON_METH_FASTCALL
37306 0 : __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc);
37307 0 : if (vc) {
37308 : #if CYTHON_ASSUME_SAFE_MACROS
37309 0 : return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw);
37310 : #else
37311 : (void) &__Pyx_PyVectorcall_FastCallDict;
37312 : return PyVectorcall_Call(func, args, kw);
37313 : #endif
37314 : }
37315 : #endif
37316 0 : if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
37317 0 : Py_ssize_t argc;
37318 0 : PyObject *new_args;
37319 0 : PyObject *self;
37320 : #if CYTHON_ASSUME_SAFE_MACROS
37321 0 : argc = PyTuple_GET_SIZE(args);
37322 : #else
37323 : argc = PyTuple_Size(args);
37324 : if (unlikely(!argc) < 0) return NULL;
37325 : #endif
37326 0 : new_args = PyTuple_GetSlice(args, 1, argc);
37327 0 : if (unlikely(!new_args))
37328 : return NULL;
37329 0 : self = PyTuple_GetItem(args, 0);
37330 0 : if (unlikely(!self)) {
37331 0 : Py_DECREF(new_args);
37332 : #if PY_MAJOR_VERSION > 2
37333 0 : PyErr_Format(PyExc_TypeError,
37334 : "unbound method %.200S() needs an argument",
37335 : cyfunc->func_qualname);
37336 : #else
37337 : PyErr_SetString(PyExc_TypeError,
37338 : "unbound method needs an argument");
37339 : #endif
37340 0 : return NULL;
37341 : }
37342 0 : result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
37343 0 : Py_DECREF(new_args);
37344 : } else {
37345 0 : result = __Pyx_CyFunction_Call(func, args, kw);
37346 : }
37347 : return result;
37348 : }
37349 : #if CYTHON_METH_FASTCALL
37350 803 : static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames)
37351 : {
37352 803 : int ret = 0;
37353 803 : if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
37354 0 : if (unlikely(nargs < 1)) {
37355 0 : PyErr_Format(PyExc_TypeError, "%.200s() needs an argument",
37356 0 : ((PyCFunctionObject*)cyfunc)->m_ml->ml_name);
37357 0 : return -1;
37358 : }
37359 : ret = 1;
37360 : }
37361 803 : if (unlikely(kwnames) && unlikely(PyTuple_GET_SIZE(kwnames))) {
37362 0 : PyErr_Format(PyExc_TypeError,
37363 0 : "%.200s() takes no keyword arguments", ((PyCFunctionObject*)cyfunc)->m_ml->ml_name);
37364 0 : return -1;
37365 : }
37366 : return ret;
37367 : }
37368 0 : static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
37369 : {
37370 0 : __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
37371 0 : PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
37372 : #if CYTHON_BACKPORT_VECTORCALL
37373 : Py_ssize_t nargs = (Py_ssize_t)nargsf;
37374 : #else
37375 0 : Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
37376 : #endif
37377 0 : PyObject *self;
37378 0 : switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
37379 0 : case 1:
37380 0 : self = args[0];
37381 0 : args += 1;
37382 0 : nargs -= 1;
37383 0 : break;
37384 0 : case 0:
37385 0 : self = ((PyCFunctionObject*)cyfunc)->m_self;
37386 0 : break;
37387 : default:
37388 : return NULL;
37389 : }
37390 0 : if (unlikely(nargs != 0)) {
37391 0 : PyErr_Format(PyExc_TypeError,
37392 : "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
37393 : def->ml_name, nargs);
37394 0 : return NULL;
37395 : }
37396 0 : return def->ml_meth(self, NULL);
37397 : }
37398 0 : static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
37399 : {
37400 0 : __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
37401 0 : PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
37402 : #if CYTHON_BACKPORT_VECTORCALL
37403 : Py_ssize_t nargs = (Py_ssize_t)nargsf;
37404 : #else
37405 0 : Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
37406 : #endif
37407 0 : PyObject *self;
37408 0 : switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
37409 0 : case 1:
37410 0 : self = args[0];
37411 0 : args += 1;
37412 0 : nargs -= 1;
37413 0 : break;
37414 0 : case 0:
37415 0 : self = ((PyCFunctionObject*)cyfunc)->m_self;
37416 0 : break;
37417 : default:
37418 : return NULL;
37419 : }
37420 0 : if (unlikely(nargs != 1)) {
37421 0 : PyErr_Format(PyExc_TypeError,
37422 : "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
37423 : def->ml_name, nargs);
37424 0 : return NULL;
37425 : }
37426 0 : return def->ml_meth(self, args[0]);
37427 : }
37428 803 : static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
37429 : {
37430 803 : __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
37431 803 : PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
37432 : #if CYTHON_BACKPORT_VECTORCALL
37433 : Py_ssize_t nargs = (Py_ssize_t)nargsf;
37434 : #else
37435 803 : Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
37436 : #endif
37437 803 : PyObject *self;
37438 803 : switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
37439 0 : case 1:
37440 0 : self = args[0];
37441 0 : args += 1;
37442 0 : nargs -= 1;
37443 0 : break;
37444 803 : case 0:
37445 803 : self = ((PyCFunctionObject*)cyfunc)->m_self;
37446 803 : break;
37447 : default:
37448 : return NULL;
37449 : }
37450 803 : return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))def->ml_meth)(self, args, nargs, kwnames);
37451 : }
37452 0 : static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
37453 : {
37454 0 : __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
37455 0 : PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
37456 0 : PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc);
37457 : #if CYTHON_BACKPORT_VECTORCALL
37458 : Py_ssize_t nargs = (Py_ssize_t)nargsf;
37459 : #else
37460 0 : Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
37461 : #endif
37462 0 : PyObject *self;
37463 0 : switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
37464 0 : case 1:
37465 0 : self = args[0];
37466 0 : args += 1;
37467 0 : nargs -= 1;
37468 0 : break;
37469 0 : case 0:
37470 0 : self = ((PyCFunctionObject*)cyfunc)->m_self;
37471 0 : break;
37472 : default:
37473 : return NULL;
37474 : }
37475 0 : return ((__Pyx_PyCMethod)(void(*)(void))def->ml_meth)(self, cls, args, (size_t)nargs, kwnames);
37476 : }
37477 : #endif
37478 : #if CYTHON_USE_TYPE_SPECS
37479 : static PyType_Slot __pyx_CyFunctionType_slots[] = {
37480 : {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc},
37481 : {Py_tp_repr, (void *)__Pyx_CyFunction_repr},
37482 : {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod},
37483 : {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse},
37484 : {Py_tp_clear, (void *)__Pyx_CyFunction_clear},
37485 : {Py_tp_methods, (void *)__pyx_CyFunction_methods},
37486 : {Py_tp_members, (void *)__pyx_CyFunction_members},
37487 : {Py_tp_getset, (void *)__pyx_CyFunction_getsets},
37488 : {Py_tp_descr_get, (void *)__Pyx_PyMethod_New},
37489 : {0, 0},
37490 : };
37491 : static PyType_Spec __pyx_CyFunctionType_spec = {
37492 : __PYX_TYPE_MODULE_PREFIX "cython_function_or_method",
37493 : sizeof(__pyx_CyFunctionObject),
37494 : 0,
37495 : #ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
37496 : Py_TPFLAGS_METHOD_DESCRIPTOR |
37497 : #endif
37498 : #if (defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL)
37499 : _Py_TPFLAGS_HAVE_VECTORCALL |
37500 : #endif
37501 : Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
37502 : __pyx_CyFunctionType_slots
37503 : };
37504 : #else
37505 : static PyTypeObject __pyx_CyFunctionType_type = {
37506 : PyVarObject_HEAD_INIT(0, 0)
37507 : __PYX_TYPE_MODULE_PREFIX "cython_function_or_method",
37508 : sizeof(__pyx_CyFunctionObject),
37509 : 0,
37510 : (destructor) __Pyx_CyFunction_dealloc,
37511 : #if !CYTHON_METH_FASTCALL
37512 : 0,
37513 : #elif CYTHON_BACKPORT_VECTORCALL
37514 : (printfunc)offsetof(__pyx_CyFunctionObject, func_vectorcall),
37515 : #else
37516 : offsetof(PyCFunctionObject, vectorcall),
37517 : #endif
37518 : 0,
37519 : 0,
37520 : #if PY_MAJOR_VERSION < 3
37521 : 0,
37522 : #else
37523 : 0,
37524 : #endif
37525 : (reprfunc) __Pyx_CyFunction_repr,
37526 : 0,
37527 : 0,
37528 : 0,
37529 : 0,
37530 : __Pyx_CyFunction_CallAsMethod,
37531 : 0,
37532 : 0,
37533 : 0,
37534 : 0,
37535 : #ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
37536 : Py_TPFLAGS_METHOD_DESCRIPTOR |
37537 : #endif
37538 : #if defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL
37539 : _Py_TPFLAGS_HAVE_VECTORCALL |
37540 : #endif
37541 : Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
37542 : 0,
37543 : (traverseproc) __Pyx_CyFunction_traverse,
37544 : (inquiry) __Pyx_CyFunction_clear,
37545 : 0,
37546 : #if PY_VERSION_HEX < 0x030500A0
37547 : offsetof(__pyx_CyFunctionObject, func_weakreflist),
37548 : #else
37549 : offsetof(PyCFunctionObject, m_weakreflist),
37550 : #endif
37551 : 0,
37552 : 0,
37553 : __pyx_CyFunction_methods,
37554 : __pyx_CyFunction_members,
37555 : __pyx_CyFunction_getsets,
37556 : 0,
37557 : 0,
37558 : __Pyx_PyMethod_New,
37559 : 0,
37560 : offsetof(__pyx_CyFunctionObject, func_dict),
37561 : 0,
37562 : 0,
37563 : 0,
37564 : 0,
37565 : 0,
37566 : 0,
37567 : 0,
37568 : 0,
37569 : 0,
37570 : 0,
37571 : 0,
37572 : 0,
37573 : #if PY_VERSION_HEX >= 0x030400a1
37574 : 0,
37575 : #endif
37576 : #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
37577 : 0,
37578 : #endif
37579 : #if __PYX_NEED_TP_PRINT_SLOT
37580 : 0,
37581 : #endif
37582 : #if PY_VERSION_HEX >= 0x030C0000
37583 : 0,
37584 : #endif
37585 : #if PY_VERSION_HEX >= 0x030d00A4
37586 : 0,
37587 : #endif
37588 : #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
37589 : 0,
37590 : #endif
37591 : };
37592 : #endif
37593 3 : static int __pyx_CyFunction_init(PyObject *module) {
37594 : #if CYTHON_USE_TYPE_SPECS
37595 : __pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(module, &__pyx_CyFunctionType_spec, NULL);
37596 : #else
37597 3 : CYTHON_UNUSED_VAR(module);
37598 3 : __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
37599 : #endif
37600 3 : if (unlikely(__pyx_CyFunctionType == NULL)) {
37601 0 : return -1;
37602 : }
37603 : return 0;
37604 : }
37605 12 : static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
37606 12 : __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
37607 12 : m->defaults = PyObject_Malloc(size);
37608 12 : if (unlikely(!m->defaults))
37609 0 : return PyErr_NoMemory();
37610 12 : memset(m->defaults, 0, size);
37611 12 : m->defaults_pyobjects = pyobjects;
37612 12 : m->defaults_size = size;
37613 12 : return m->defaults;
37614 : }
37615 36 : static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
37616 36 : __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
37617 36 : m->defaults_tuple = tuple;
37618 36 : Py_INCREF(tuple);
37619 : }
37620 : static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
37621 : __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
37622 : m->defaults_kwdict = dict;
37623 : Py_INCREF(dict);
37624 : }
37625 : static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
37626 : __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
37627 : m->func_annotations = dict;
37628 : Py_INCREF(dict);
37629 : }
37630 :
37631 : /* CythonFunction */
37632 33 : static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
37633 : PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
37634 33 : PyObject *op = __Pyx_CyFunction_Init(
37635 33 : PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType),
37636 : ml, flags, qualname, closure, module, globals, code
37637 : );
37638 33 : if (likely(op)) {
37639 33 : PyObject_GC_Track(op);
37640 : }
37641 33 : return op;
37642 : }
37643 :
37644 : /* FusedFunction */
37645 : static PyObject *
37646 36 : __pyx_FusedFunction_New(PyMethodDef *ml, int flags,
37647 : PyObject *qualname, PyObject *closure,
37648 : PyObject *module, PyObject *globals,
37649 : PyObject *code)
37650 : {
37651 36 : PyObject *op = __Pyx_CyFunction_Init(
37652 36 : PyObject_GC_New(__pyx_CyFunctionObject, __pyx_FusedFunctionType),
37653 : ml, flags, qualname, closure, module, globals, code
37654 : );
37655 36 : if (likely(op)) {
37656 36 : __pyx_FusedFunctionObject *fusedfunc = (__pyx_FusedFunctionObject *) op;
37657 36 : fusedfunc->__signatures__ = NULL;
37658 36 : fusedfunc->self = NULL;
37659 36 : PyObject_GC_Track(op);
37660 : }
37661 36 : return op;
37662 : }
37663 : static void
37664 0 : __pyx_FusedFunction_dealloc(__pyx_FusedFunctionObject *self)
37665 : {
37666 0 : PyObject_GC_UnTrack(self);
37667 0 : Py_CLEAR(self->self);
37668 0 : Py_CLEAR(self->__signatures__);
37669 0 : __Pyx__CyFunction_dealloc((__pyx_CyFunctionObject *) self);
37670 0 : }
37671 : static int
37672 0 : __pyx_FusedFunction_traverse(__pyx_FusedFunctionObject *self,
37673 : visitproc visit,
37674 : void *arg)
37675 : {
37676 0 : Py_VISIT(self->self);
37677 0 : Py_VISIT(self->__signatures__);
37678 0 : return __Pyx_CyFunction_traverse((__pyx_CyFunctionObject *) self, visit, arg);
37679 : }
37680 : static int
37681 0 : __pyx_FusedFunction_clear(__pyx_FusedFunctionObject *self)
37682 : {
37683 0 : Py_CLEAR(self->self);
37684 0 : Py_CLEAR(self->__signatures__);
37685 0 : return __Pyx_CyFunction_clear((__pyx_CyFunctionObject *) self);
37686 : }
37687 : static PyObject *
37688 0 : __pyx_FusedFunction_descr_get(PyObject *self, PyObject *obj, PyObject *type)
37689 : {
37690 0 : __pyx_FusedFunctionObject *func, *meth;
37691 0 : func = (__pyx_FusedFunctionObject *) self;
37692 0 : if (func->self || func->func.flags & __Pyx_CYFUNCTION_STATICMETHOD) {
37693 0 : Py_INCREF(self);
37694 0 : return self;
37695 : }
37696 0 : if (obj == Py_None)
37697 0 : obj = NULL;
37698 0 : if (func->func.flags & __Pyx_CYFUNCTION_CLASSMETHOD)
37699 0 : obj = type;
37700 0 : if (obj == NULL) {
37701 0 : Py_INCREF(self);
37702 0 : return self;
37703 : }
37704 0 : meth = (__pyx_FusedFunctionObject *) __pyx_FusedFunction_New(
37705 : ((PyCFunctionObject *) func)->m_ml,
37706 : ((__pyx_CyFunctionObject *) func)->flags,
37707 : ((__pyx_CyFunctionObject *) func)->func_qualname,
37708 : ((__pyx_CyFunctionObject *) func)->func_closure,
37709 : ((PyCFunctionObject *) func)->m_module,
37710 : ((__pyx_CyFunctionObject *) func)->func_globals,
37711 : ((__pyx_CyFunctionObject *) func)->func_code);
37712 0 : if (unlikely(!meth))
37713 : return NULL;
37714 0 : if (func->func.defaults) {
37715 0 : PyObject **pydefaults;
37716 0 : int i;
37717 0 : if (unlikely(!__Pyx_CyFunction_InitDefaults(
37718 : (PyObject*)meth,
37719 : func->func.defaults_size,
37720 : func->func.defaults_pyobjects))) {
37721 0 : Py_XDECREF((PyObject*)meth);
37722 0 : return NULL;
37723 : }
37724 0 : memcpy(meth->func.defaults, func->func.defaults, func->func.defaults_size);
37725 0 : pydefaults = __Pyx_CyFunction_Defaults(PyObject *, meth);
37726 0 : for (i = 0; i < meth->func.defaults_pyobjects; i++)
37727 0 : Py_XINCREF(pydefaults[i]);
37728 : }
37729 0 : __Pyx_CyFunction_SetClassObj(meth, __Pyx_CyFunction_GetClassObj(func));
37730 0 : Py_XINCREF(func->__signatures__);
37731 0 : meth->__signatures__ = func->__signatures__;
37732 0 : Py_XINCREF(func->func.defaults_tuple);
37733 0 : meth->func.defaults_tuple = func->func.defaults_tuple;
37734 0 : Py_XINCREF(obj);
37735 0 : meth->self = obj;
37736 0 : return (PyObject *) meth;
37737 : }
37738 : static PyObject *
37739 0 : _obj_to_string(PyObject *obj)
37740 : {
37741 0 : if (PyUnicode_CheckExact(obj))
37742 0 : return __Pyx_NewRef(obj);
37743 : #if PY_MAJOR_VERSION == 2
37744 : else if (PyString_Check(obj))
37745 : return PyUnicode_FromEncodedObject(obj, NULL, "strict");
37746 : #endif
37747 0 : else if (PyType_Check(obj))
37748 0 : return PyObject_GetAttr(obj, __pyx_n_s_name_2);
37749 : else
37750 0 : return PyObject_Unicode(obj);
37751 : }
37752 : static PyObject *
37753 0 : __pyx_FusedFunction_getitem(__pyx_FusedFunctionObject *self, PyObject *idx)
37754 : {
37755 0 : PyObject *signature = NULL;
37756 0 : PyObject *unbound_result_func;
37757 0 : PyObject *result_func = NULL;
37758 0 : if (unlikely(self->__signatures__ == NULL)) {
37759 0 : PyErr_SetString(PyExc_TypeError, "Function is not fused");
37760 0 : return NULL;
37761 : }
37762 0 : if (PyTuple_Check(idx)) {
37763 0 : Py_ssize_t n = PyTuple_GET_SIZE(idx);
37764 0 : PyObject *list = PyList_New(n);
37765 0 : int i;
37766 0 : if (unlikely(!list))
37767 : return NULL;
37768 0 : for (i = 0; i < n; i++) {
37769 0 : PyObject *string;
37770 : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
37771 0 : PyObject *item = PyTuple_GET_ITEM(idx, i);
37772 : #else
37773 : PyObject *item = PySequence_ITEM(idx, i); if (unlikely(!item)) goto __pyx_err;
37774 : #endif
37775 0 : string = _obj_to_string(item);
37776 : #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
37777 : Py_DECREF(item);
37778 : #endif
37779 0 : if (unlikely(!string)) goto __pyx_err;
37780 0 : PyList_SET_ITEM(list, i, string);
37781 : }
37782 0 : signature = PyUnicode_Join(__pyx_kp_u__17, list);
37783 0 : __pyx_err:;
37784 0 : Py_DECREF(list);
37785 : } else {
37786 0 : signature = _obj_to_string(idx);
37787 : }
37788 0 : if (unlikely(!signature))
37789 : return NULL;
37790 0 : unbound_result_func = PyObject_GetItem(self->__signatures__, signature);
37791 0 : if (likely(unbound_result_func)) {
37792 0 : if (self->self) {
37793 0 : __pyx_FusedFunctionObject *unbound = (__pyx_FusedFunctionObject *) unbound_result_func;
37794 0 : __Pyx_CyFunction_SetClassObj(unbound, __Pyx_CyFunction_GetClassObj(self));
37795 0 : result_func = __pyx_FusedFunction_descr_get(unbound_result_func,
37796 : self->self, self->self);
37797 : } else {
37798 0 : result_func = unbound_result_func;
37799 0 : Py_INCREF(result_func);
37800 : }
37801 : }
37802 0 : Py_DECREF(signature);
37803 0 : Py_XDECREF(unbound_result_func);
37804 0 : return result_func;
37805 : }
37806 : static PyObject *
37807 0 : __pyx_FusedFunction_callfunction(PyObject *func, PyObject *args, PyObject *kw)
37808 : {
37809 0 : __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
37810 0 : int static_specialized = (cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD &&
37811 0 : !((__pyx_FusedFunctionObject *) func)->__signatures__);
37812 0 : if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !static_specialized) {
37813 0 : return __Pyx_CyFunction_CallAsMethod(func, args, kw);
37814 : } else {
37815 0 : return __Pyx_CyFunction_Call(func, args, kw);
37816 : }
37817 : }
37818 : static PyObject *
37819 0 : __pyx_FusedFunction_call(PyObject *func, PyObject *args, PyObject *kw)
37820 : {
37821 0 : __pyx_FusedFunctionObject *binding_func = (__pyx_FusedFunctionObject *) func;
37822 0 : Py_ssize_t argc = PyTuple_GET_SIZE(args);
37823 0 : PyObject *new_args = NULL;
37824 0 : __pyx_FusedFunctionObject *new_func = NULL;
37825 0 : PyObject *result = NULL;
37826 0 : int is_staticmethod = binding_func->func.flags & __Pyx_CYFUNCTION_STATICMETHOD;
37827 0 : if (binding_func->self) {
37828 0 : PyObject *self;
37829 0 : Py_ssize_t i;
37830 0 : new_args = PyTuple_New(argc + 1);
37831 0 : if (unlikely(!new_args))
37832 : return NULL;
37833 0 : self = binding_func->self;
37834 0 : Py_INCREF(self);
37835 0 : PyTuple_SET_ITEM(new_args, 0, self);
37836 0 : self = NULL;
37837 0 : for (i = 0; i < argc; i++) {
37838 : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
37839 0 : PyObject *item = PyTuple_GET_ITEM(args, i);
37840 0 : Py_INCREF(item);
37841 : #else
37842 : PyObject *item = PySequence_ITEM(args, i); if (unlikely(!item)) goto bad;
37843 : #endif
37844 0 : PyTuple_SET_ITEM(new_args, i + 1, item);
37845 : }
37846 : args = new_args;
37847 : }
37848 0 : if (binding_func->__signatures__) {
37849 0 : PyObject *tup;
37850 0 : if (is_staticmethod && binding_func->func.flags & __Pyx_CYFUNCTION_CCLASS) {
37851 0 : tup = PyTuple_Pack(3, args,
37852 : kw == NULL ? Py_None : kw,
37853 : binding_func->func.defaults_tuple);
37854 0 : if (unlikely(!tup)) goto bad;
37855 0 : new_func = (__pyx_FusedFunctionObject *) __Pyx_CyFunction_CallMethod(
37856 : func, binding_func->__signatures__, tup, NULL);
37857 : } else {
37858 0 : tup = PyTuple_Pack(4, binding_func->__signatures__, args,
37859 : kw == NULL ? Py_None : kw,
37860 : binding_func->func.defaults_tuple);
37861 0 : if (unlikely(!tup)) goto bad;
37862 0 : new_func = (__pyx_FusedFunctionObject *) __pyx_FusedFunction_callfunction(func, tup, NULL);
37863 : }
37864 0 : Py_DECREF(tup);
37865 0 : if (unlikely(!new_func))
37866 0 : goto bad;
37867 0 : __Pyx_CyFunction_SetClassObj(new_func, __Pyx_CyFunction_GetClassObj(binding_func));
37868 0 : func = (PyObject *) new_func;
37869 : }
37870 0 : result = __pyx_FusedFunction_callfunction(func, args, kw);
37871 0 : bad:
37872 0 : Py_XDECREF(new_args);
37873 0 : Py_XDECREF((PyObject *) new_func);
37874 0 : return result;
37875 : }
37876 : static PyMemberDef __pyx_FusedFunction_members[] = {
37877 : {(char *) "__signatures__",
37878 : T_OBJECT,
37879 : offsetof(__pyx_FusedFunctionObject, __signatures__),
37880 : READONLY,
37881 : 0},
37882 : {(char *) "__self__", T_OBJECT_EX, offsetof(__pyx_FusedFunctionObject, self), READONLY, 0},
37883 : {0, 0, 0, 0, 0},
37884 : };
37885 : static PyGetSetDef __pyx_FusedFunction_getsets[] = {
37886 : {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
37887 : {0, 0, 0, 0, 0}
37888 : };
37889 : #if CYTHON_USE_TYPE_SPECS
37890 : static PyType_Slot __pyx_FusedFunctionType_slots[] = {
37891 : {Py_tp_dealloc, (void *)__pyx_FusedFunction_dealloc},
37892 : {Py_tp_call, (void *)__pyx_FusedFunction_call},
37893 : {Py_tp_traverse, (void *)__pyx_FusedFunction_traverse},
37894 : {Py_tp_clear, (void *)__pyx_FusedFunction_clear},
37895 : {Py_tp_members, (void *)__pyx_FusedFunction_members},
37896 : {Py_tp_getset, (void *)__pyx_FusedFunction_getsets},
37897 : {Py_tp_descr_get, (void *)__pyx_FusedFunction_descr_get},
37898 : {Py_mp_subscript, (void *)__pyx_FusedFunction_getitem},
37899 : {0, 0},
37900 : };
37901 : static PyType_Spec __pyx_FusedFunctionType_spec = {
37902 : __PYX_TYPE_MODULE_PREFIX "fused_cython_function",
37903 : sizeof(__pyx_FusedFunctionObject),
37904 : 0,
37905 : Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
37906 : __pyx_FusedFunctionType_slots
37907 : };
37908 : #else
37909 : static PyMappingMethods __pyx_FusedFunction_mapping_methods = {
37910 : 0,
37911 : (binaryfunc) __pyx_FusedFunction_getitem,
37912 : 0,
37913 : };
37914 : static PyTypeObject __pyx_FusedFunctionType_type = {
37915 : PyVarObject_HEAD_INIT(0, 0)
37916 : __PYX_TYPE_MODULE_PREFIX "fused_cython_function",
37917 : sizeof(__pyx_FusedFunctionObject),
37918 : 0,
37919 : (destructor) __pyx_FusedFunction_dealloc,
37920 : 0,
37921 : 0,
37922 : 0,
37923 : #if PY_MAJOR_VERSION < 3
37924 : 0,
37925 : #else
37926 : 0,
37927 : #endif
37928 : 0,
37929 : 0,
37930 : 0,
37931 : &__pyx_FusedFunction_mapping_methods,
37932 : 0,
37933 : (ternaryfunc) __pyx_FusedFunction_call,
37934 : 0,
37935 : 0,
37936 : 0,
37937 : 0,
37938 : Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
37939 : 0,
37940 : (traverseproc) __pyx_FusedFunction_traverse,
37941 : (inquiry) __pyx_FusedFunction_clear,
37942 : 0,
37943 : 0,
37944 : 0,
37945 : 0,
37946 : 0,
37947 : __pyx_FusedFunction_members,
37948 : __pyx_FusedFunction_getsets,
37949 : &__pyx_CyFunctionType_type,
37950 : 0,
37951 : __pyx_FusedFunction_descr_get,
37952 : 0,
37953 : 0,
37954 : 0,
37955 : 0,
37956 : 0,
37957 : 0,
37958 : 0,
37959 : 0,
37960 : 0,
37961 : 0,
37962 : 0,
37963 : 0,
37964 : 0,
37965 : 0,
37966 : #if PY_VERSION_HEX >= 0x030400a1
37967 : 0,
37968 : #endif
37969 : #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
37970 : 0,
37971 : #endif
37972 : #if __PYX_NEED_TP_PRINT_SLOT
37973 : 0,
37974 : #endif
37975 : #if PY_VERSION_HEX >= 0x030C0000
37976 : 0,
37977 : #endif
37978 : #if PY_VERSION_HEX >= 0x030d00A4
37979 : 0,
37980 : #endif
37981 : #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
37982 : 0,
37983 : #endif
37984 : };
37985 : #endif
37986 3 : static int __pyx_FusedFunction_init(PyObject *module) {
37987 : #if CYTHON_USE_TYPE_SPECS
37988 : PyObject *bases = PyTuple_Pack(1, __pyx_CyFunctionType);
37989 : if (unlikely(!bases)) {
37990 : return -1;
37991 : }
37992 : __pyx_FusedFunctionType = __Pyx_FetchCommonTypeFromSpec(module, &__pyx_FusedFunctionType_spec, bases);
37993 : Py_DECREF(bases);
37994 : #else
37995 3 : CYTHON_UNUSED_VAR(module);
37996 3 : __pyx_FusedFunctionType_type.tp_base = __pyx_CyFunctionType;
37997 3 : __pyx_FusedFunctionType = __Pyx_FetchCommonType(&__pyx_FusedFunctionType_type);
37998 : #endif
37999 3 : if (unlikely(__pyx_FusedFunctionType == NULL)) {
38000 0 : return -1;
38001 : }
38002 : return 0;
38003 : }
38004 :
38005 : /* CLineInTraceback */
38006 : #ifndef CYTHON_CLINE_IN_TRACEBACK
38007 0 : static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
38008 0 : PyObject *use_cline;
38009 0 : PyObject *ptype, *pvalue, *ptraceback;
38010 : #if CYTHON_COMPILING_IN_CPYTHON
38011 0 : PyObject **cython_runtime_dict;
38012 : #endif
38013 0 : CYTHON_MAYBE_UNUSED_VAR(tstate);
38014 0 : if (unlikely(!__pyx_cython_runtime)) {
38015 : return c_line;
38016 : }
38017 0 : __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
38018 : #if CYTHON_COMPILING_IN_CPYTHON
38019 0 : cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
38020 0 : if (likely(cython_runtime_dict)) {
38021 0 : __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
38022 : use_cline, *cython_runtime_dict,
38023 : __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
38024 : } else
38025 : #endif
38026 : {
38027 0 : PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStrNoError(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
38028 0 : if (use_cline_obj) {
38029 0 : use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
38030 0 : Py_DECREF(use_cline_obj);
38031 : } else {
38032 0 : PyErr_Clear();
38033 0 : use_cline = NULL;
38034 : }
38035 : }
38036 0 : if (!use_cline) {
38037 0 : c_line = 0;
38038 0 : (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
38039 : }
38040 0 : else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
38041 : c_line = 0;
38042 : }
38043 0 : __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
38044 0 : return c_line;
38045 : }
38046 : #endif
38047 :
38048 : /* CodeObjectCache */
38049 : #if !CYTHON_COMPILING_IN_LIMITED_API
38050 0 : static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
38051 0 : int start = 0, mid = 0, end = count - 1;
38052 0 : if (end >= 0 && code_line > entries[end].code_line) {
38053 : return count;
38054 : }
38055 0 : while (start < end) {
38056 0 : mid = start + (end - start) / 2;
38057 0 : if (code_line < entries[mid].code_line) {
38058 : end = mid;
38059 0 : } else if (code_line > entries[mid].code_line) {
38060 0 : start = mid + 1;
38061 : } else {
38062 0 : return mid;
38063 : }
38064 : }
38065 0 : if (code_line <= entries[mid].code_line) {
38066 : return mid;
38067 : } else {
38068 0 : return mid + 1;
38069 : }
38070 : }
38071 0 : static PyCodeObject *__pyx_find_code_object(int code_line) {
38072 0 : PyCodeObject* code_object;
38073 0 : int pos;
38074 0 : if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
38075 : return NULL;
38076 : }
38077 0 : pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
38078 0 : if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
38079 : return NULL;
38080 : }
38081 0 : code_object = __pyx_code_cache.entries[pos].code_object;
38082 0 : Py_INCREF(code_object);
38083 : return code_object;
38084 : }
38085 0 : static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
38086 0 : int pos, i;
38087 0 : __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
38088 0 : if (unlikely(!code_line)) {
38089 : return;
38090 : }
38091 0 : if (unlikely(!entries)) {
38092 0 : entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
38093 0 : if (likely(entries)) {
38094 0 : __pyx_code_cache.entries = entries;
38095 0 : __pyx_code_cache.max_count = 64;
38096 0 : __pyx_code_cache.count = 1;
38097 0 : entries[0].code_line = code_line;
38098 0 : entries[0].code_object = code_object;
38099 0 : Py_INCREF(code_object);
38100 : }
38101 0 : return;
38102 : }
38103 0 : pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
38104 0 : if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
38105 0 : PyCodeObject* tmp = entries[pos].code_object;
38106 0 : entries[pos].code_object = code_object;
38107 0 : Py_DECREF(tmp);
38108 0 : return;
38109 : }
38110 0 : if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
38111 0 : int new_max = __pyx_code_cache.max_count + 64;
38112 0 : entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
38113 0 : __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
38114 0 : if (unlikely(!entries)) {
38115 : return;
38116 : }
38117 0 : __pyx_code_cache.entries = entries;
38118 0 : __pyx_code_cache.max_count = new_max;
38119 : }
38120 0 : for (i=__pyx_code_cache.count; i>pos; i--) {
38121 0 : entries[i] = entries[i-1];
38122 : }
38123 0 : entries[pos].code_line = code_line;
38124 0 : entries[pos].code_object = code_object;
38125 0 : __pyx_code_cache.count++;
38126 0 : Py_INCREF(code_object);
38127 : }
38128 : #endif
38129 :
38130 : /* AddTraceback */
38131 : #include "compile.h"
38132 : #include "frameobject.h"
38133 : #include "traceback.h"
38134 : #if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API
38135 : #ifndef Py_BUILD_CORE
38136 : #define Py_BUILD_CORE 1
38137 : #endif
38138 : #include "internal/pycore_frame.h"
38139 : #endif
38140 : #if CYTHON_COMPILING_IN_LIMITED_API
38141 : static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict,
38142 : PyObject *firstlineno, PyObject *name) {
38143 : PyObject *replace = NULL;
38144 : if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL;
38145 : if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL;
38146 : replace = PyObject_GetAttrString(code, "replace");
38147 : if (likely(replace)) {
38148 : PyObject *result;
38149 : result = PyObject_Call(replace, __pyx_empty_tuple, scratch_dict);
38150 : Py_DECREF(replace);
38151 : return result;
38152 : }
38153 : PyErr_Clear();
38154 : #if __PYX_LIMITED_VERSION_HEX < 0x030780000
38155 : {
38156 : PyObject *compiled = NULL, *result = NULL;
38157 : if (unlikely(PyDict_SetItemString(scratch_dict, "code", code))) return NULL;
38158 : if (unlikely(PyDict_SetItemString(scratch_dict, "type", (PyObject*)(&PyType_Type)))) return NULL;
38159 : compiled = Py_CompileString(
38160 : "out = type(code)(\n"
38161 : " code.co_argcount, code.co_kwonlyargcount, code.co_nlocals, code.co_stacksize,\n"
38162 : " code.co_flags, code.co_code, code.co_consts, code.co_names,\n"
38163 : " code.co_varnames, code.co_filename, co_name, co_firstlineno,\n"
38164 : " code.co_lnotab)\n", "<dummy>", Py_file_input);
38165 : if (!compiled) return NULL;
38166 : result = PyEval_EvalCode(compiled, scratch_dict, scratch_dict);
38167 : Py_DECREF(compiled);
38168 : if (!result) PyErr_Print();
38169 : Py_DECREF(result);
38170 : result = PyDict_GetItemString(scratch_dict, "out");
38171 : if (result) Py_INCREF(result);
38172 : return result;
38173 : }
38174 : #else
38175 : return NULL;
38176 : #endif
38177 : }
38178 : static void __Pyx_AddTraceback(const char *funcname, int c_line,
38179 : int py_line, const char *filename) {
38180 : PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL;
38181 : PyObject *replace = NULL, *getframe = NULL, *frame = NULL;
38182 : PyObject *exc_type, *exc_value, *exc_traceback;
38183 : int success = 0;
38184 : if (c_line) {
38185 : (void) __pyx_cfilenm;
38186 : (void) __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line);
38187 : }
38188 : PyErr_Fetch(&exc_type, &exc_value, &exc_traceback);
38189 : code_object = Py_CompileString("_getframe()", filename, Py_eval_input);
38190 : if (unlikely(!code_object)) goto bad;
38191 : py_py_line = PyLong_FromLong(py_line);
38192 : if (unlikely(!py_py_line)) goto bad;
38193 : py_funcname = PyUnicode_FromString(funcname);
38194 : if (unlikely(!py_funcname)) goto bad;
38195 : dict = PyDict_New();
38196 : if (unlikely(!dict)) goto bad;
38197 : {
38198 : PyObject *old_code_object = code_object;
38199 : code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname);
38200 : Py_DECREF(old_code_object);
38201 : }
38202 : if (unlikely(!code_object)) goto bad;
38203 : getframe = PySys_GetObject("_getframe");
38204 : if (unlikely(!getframe)) goto bad;
38205 : if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad;
38206 : frame = PyEval_EvalCode(code_object, dict, dict);
38207 : if (unlikely(!frame) || frame == Py_None) goto bad;
38208 : success = 1;
38209 : bad:
38210 : PyErr_Restore(exc_type, exc_value, exc_traceback);
38211 : Py_XDECREF(code_object);
38212 : Py_XDECREF(py_py_line);
38213 : Py_XDECREF(py_funcname);
38214 : Py_XDECREF(dict);
38215 : Py_XDECREF(replace);
38216 : if (success) {
38217 : PyTraceBack_Here(
38218 : (struct _frame*)frame);
38219 : }
38220 : Py_XDECREF(frame);
38221 : }
38222 : #else
38223 0 : static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
38224 : const char *funcname, int c_line,
38225 : int py_line, const char *filename) {
38226 0 : PyCodeObject *py_code = NULL;
38227 0 : PyObject *py_funcname = NULL;
38228 : #if PY_MAJOR_VERSION < 3
38229 : PyObject *py_srcfile = NULL;
38230 : py_srcfile = PyString_FromString(filename);
38231 : if (!py_srcfile) goto bad;
38232 : #endif
38233 0 : if (c_line) {
38234 : #if PY_MAJOR_VERSION < 3
38235 : py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
38236 : if (!py_funcname) goto bad;
38237 : #else
38238 0 : py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
38239 0 : if (!py_funcname) goto bad;
38240 0 : funcname = PyUnicode_AsUTF8(py_funcname);
38241 0 : if (!funcname) goto bad;
38242 : #endif
38243 : }
38244 : else {
38245 : #if PY_MAJOR_VERSION < 3
38246 : py_funcname = PyString_FromString(funcname);
38247 : if (!py_funcname) goto bad;
38248 : #endif
38249 0 : }
38250 : #if PY_MAJOR_VERSION < 3
38251 : py_code = __Pyx_PyCode_New(
38252 : 0,
38253 : 0,
38254 : 0,
38255 : 0,
38256 : 0,
38257 : 0,
38258 : __pyx_empty_bytes, /*PyObject *code,*/
38259 : __pyx_empty_tuple, /*PyObject *consts,*/
38260 : __pyx_empty_tuple, /*PyObject *names,*/
38261 : __pyx_empty_tuple, /*PyObject *varnames,*/
38262 : __pyx_empty_tuple, /*PyObject *freevars,*/
38263 : __pyx_empty_tuple, /*PyObject *cellvars,*/
38264 : py_srcfile, /*PyObject *filename,*/
38265 : py_funcname, /*PyObject *name,*/
38266 : py_line,
38267 : __pyx_empty_bytes /*PyObject *lnotab*/
38268 : );
38269 : Py_DECREF(py_srcfile);
38270 : #else
38271 0 : py_code = PyCode_NewEmpty(filename, funcname, py_line);
38272 : #endif
38273 0 : Py_XDECREF(py_funcname);
38274 0 : return py_code;
38275 0 : bad:
38276 0 : Py_XDECREF(py_funcname);
38277 : #if PY_MAJOR_VERSION < 3
38278 : Py_XDECREF(py_srcfile);
38279 : #endif
38280 0 : return NULL;
38281 : }
38282 0 : static void __Pyx_AddTraceback(const char *funcname, int c_line,
38283 : int py_line, const char *filename) {
38284 0 : PyCodeObject *py_code = 0;
38285 0 : PyFrameObject *py_frame = 0;
38286 0 : PyThreadState *tstate = __Pyx_PyThreadState_Current;
38287 0 : PyObject *ptype, *pvalue, *ptraceback;
38288 0 : if (c_line) {
38289 0 : c_line = __Pyx_CLineForTraceback(tstate, c_line);
38290 : }
38291 0 : py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
38292 0 : if (!py_code) {
38293 0 : __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
38294 0 : py_code = __Pyx_CreateCodeObjectForTraceback(
38295 : funcname, c_line, py_line, filename);
38296 0 : if (!py_code) {
38297 : /* If the code object creation fails, then we should clear the
38298 : fetched exception references and propagate the new exception */
38299 0 : Py_XDECREF(ptype);
38300 0 : Py_XDECREF(pvalue);
38301 0 : Py_XDECREF(ptraceback);
38302 0 : goto bad;
38303 : }
38304 0 : __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
38305 0 : __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
38306 : }
38307 0 : py_frame = PyFrame_New(
38308 : tstate, /*PyThreadState *tstate,*/
38309 : py_code, /*PyCodeObject *code,*/
38310 0 : __pyx_d, /*PyObject *globals,*/
38311 : 0 /*PyObject *locals*/
38312 : );
38313 0 : if (!py_frame) goto bad;
38314 0 : __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
38315 0 : PyTraceBack_Here(py_frame);
38316 0 : bad:
38317 0 : Py_XDECREF(py_code);
38318 0 : Py_XDECREF(py_frame);
38319 0 : }
38320 : #endif
38321 :
38322 : #if PY_MAJOR_VERSION < 3
38323 : static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) {
38324 : __Pyx_TypeName obj_type_name;
38325 : if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags);
38326 : if (__Pyx_TypeCheck(obj, __pyx_array_type)) return __pyx_array_getbuffer(obj, view, flags);
38327 : if (__Pyx_TypeCheck(obj, __pyx_memoryview_type)) return __pyx_memoryview_getbuffer(obj, view, flags);
38328 : obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
38329 : PyErr_Format(PyExc_TypeError,
38330 : "'" __Pyx_FMT_TYPENAME "' does not have the buffer interface",
38331 : obj_type_name);
38332 : __Pyx_DECREF_TypeName(obj_type_name);
38333 : return -1;
38334 : }
38335 : static void __Pyx_ReleaseBuffer(Py_buffer *view) {
38336 : PyObject *obj = view->obj;
38337 : if (!obj) return;
38338 : if (PyObject_CheckBuffer(obj)) {
38339 : PyBuffer_Release(view);
38340 : return;
38341 : }
38342 : if ((0)) {}
38343 : view->obj = NULL;
38344 : Py_DECREF(obj);
38345 : }
38346 : #endif
38347 :
38348 :
38349 : /* MemviewSliceIsContig */
38350 : static int
38351 3504 : __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim)
38352 : {
38353 3504 : int i, index, step, start;
38354 3504 : Py_ssize_t itemsize = mvs.memview->view.itemsize;
38355 3504 : if (order == 'F') {
38356 : step = 1;
38357 : start = 0;
38358 : } else {
38359 3504 : step = -1;
38360 3504 : start = ndim - 1;
38361 : }
38362 7008 : for (i = 0; i < ndim; i++) {
38363 3504 : index = start + step * i;
38364 3504 : if (mvs.suboffsets[index] >= 0 || mvs.strides[index] != itemsize)
38365 : return 0;
38366 3504 : itemsize *= mvs.shape[index];
38367 : }
38368 : return 1;
38369 : }
38370 :
38371 : /* OverlappingSlices */
38372 : static void
38373 3504 : __pyx_get_array_memory_extents(__Pyx_memviewslice *slice,
38374 : void **out_start, void **out_end,
38375 : int ndim, size_t itemsize)
38376 : {
38377 3504 : char *start, *end;
38378 3504 : int i;
38379 3504 : start = end = slice->data;
38380 7008 : for (i = 0; i < ndim; i++) {
38381 3504 : Py_ssize_t stride = slice->strides[i];
38382 3504 : Py_ssize_t extent = slice->shape[i];
38383 3504 : if (extent == 0) {
38384 0 : *out_start = *out_end = start;
38385 0 : return;
38386 : } else {
38387 3504 : if (stride > 0)
38388 3504 : end += stride * (extent - 1);
38389 : else
38390 0 : start += stride * (extent - 1);
38391 : }
38392 : }
38393 3504 : *out_start = start;
38394 3504 : *out_end = end + itemsize;
38395 : }
38396 : static int
38397 1752 : __pyx_slices_overlap(__Pyx_memviewslice *slice1,
38398 : __Pyx_memviewslice *slice2,
38399 : int ndim, size_t itemsize)
38400 : {
38401 1752 : void *start1, *end1, *start2, *end2;
38402 1752 : __pyx_get_array_memory_extents(slice1, &start1, &end1, ndim, itemsize);
38403 1752 : __pyx_get_array_memory_extents(slice2, &start2, &end2, ndim, itemsize);
38404 1752 : return (start1 < end2) && (start2 < end1);
38405 : }
38406 :
38407 : /* IsLittleEndian */
38408 0 : static CYTHON_INLINE int __Pyx_Is_Little_Endian(void)
38409 : {
38410 0 : union {
38411 : uint32_t u32;
38412 : uint8_t u8[4];
38413 : } S;
38414 0 : S.u32 = 0x01020304;
38415 0 : return S.u8[0] == 4;
38416 : }
38417 :
38418 : /* BufferFormatCheck */
38419 3057 : static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
38420 : __Pyx_BufFmt_StackElem* stack,
38421 : __Pyx_TypeInfo* type) {
38422 3057 : stack[0].field = &ctx->root;
38423 3057 : stack[0].parent_offset = 0;
38424 3057 : ctx->root.type = type;
38425 3057 : ctx->root.name = "buffer dtype";
38426 3057 : ctx->root.offset = 0;
38427 3057 : ctx->head = stack;
38428 3057 : ctx->head->field = &ctx->root;
38429 3057 : ctx->fmt_offset = 0;
38430 3057 : ctx->head->parent_offset = 0;
38431 3057 : ctx->new_packmode = '@';
38432 3057 : ctx->enc_packmode = '@';
38433 3057 : ctx->new_count = 1;
38434 3057 : ctx->enc_count = 0;
38435 3057 : ctx->enc_type = 0;
38436 3057 : ctx->is_complex = 0;
38437 3057 : ctx->is_valid_array = 0;
38438 3057 : ctx->struct_alignment = 0;
38439 3057 : while (type->typegroup == 'S') {
38440 0 : ++ctx->head;
38441 0 : ctx->head->field = type->fields;
38442 0 : ctx->head->parent_offset = 0;
38443 0 : type = type->fields->type;
38444 : }
38445 3057 : }
38446 0 : static int __Pyx_BufFmt_ParseNumber(const char** ts) {
38447 0 : int count;
38448 0 : const char* t = *ts;
38449 0 : if (*t < '0' || *t > '9') {
38450 : return -1;
38451 : } else {
38452 0 : count = *t++ - '0';
38453 0 : while (*t >= '0' && *t <= '9') {
38454 0 : count *= 10;
38455 0 : count += *t++ - '0';
38456 : }
38457 : }
38458 0 : *ts = t;
38459 0 : return count;
38460 : }
38461 0 : static int __Pyx_BufFmt_ExpectNumber(const char **ts) {
38462 0 : int number = __Pyx_BufFmt_ParseNumber(ts);
38463 0 : if (number == -1)
38464 0 : PyErr_Format(PyExc_ValueError,\
38465 0 : "Does not understand character buffer dtype format string ('%c')", **ts);
38466 0 : return number;
38467 : }
38468 0 : static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) {
38469 0 : PyErr_Format(PyExc_ValueError,
38470 : "Unexpected format string character: '%c'", ch);
38471 : }
38472 0 : static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) {
38473 0 : switch (ch) {
38474 : case '?': return "'bool'";
38475 0 : case 'c': return "'char'";
38476 0 : case 'b': return "'signed char'";
38477 0 : case 'B': return "'unsigned char'";
38478 0 : case 'h': return "'short'";
38479 0 : case 'H': return "'unsigned short'";
38480 0 : case 'i': return "'int'";
38481 0 : case 'I': return "'unsigned int'";
38482 0 : case 'l': return "'long'";
38483 0 : case 'L': return "'unsigned long'";
38484 0 : case 'q': return "'long long'";
38485 0 : case 'Q': return "'unsigned long long'";
38486 0 : case 'f': return (is_complex ? "'complex float'" : "'float'");
38487 0 : case 'd': return (is_complex ? "'complex double'" : "'double'");
38488 0 : case 'g': return (is_complex ? "'complex long double'" : "'long double'");
38489 0 : case 'T': return "a struct";
38490 0 : case 'O': return "Python object";
38491 0 : case 'P': return "a pointer";
38492 0 : case 's': case 'p': return "a string";
38493 0 : case 0: return "end";
38494 0 : default: return "unparsable format string";
38495 : }
38496 : }
38497 0 : static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) {
38498 0 : switch (ch) {
38499 : case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
38500 0 : case 'h': case 'H': return 2;
38501 : case 'i': case 'I': case 'l': case 'L': return 4;
38502 : case 'q': case 'Q': return 8;
38503 0 : case 'f': return (is_complex ? 8 : 4);
38504 0 : case 'd': return (is_complex ? 16 : 8);
38505 0 : case 'g': {
38506 0 : PyErr_SetString(PyExc_ValueError, "Python does not define a standard format string size for long double ('g')..");
38507 0 : return 0;
38508 : }
38509 : case 'O': case 'P': return sizeof(void*);
38510 0 : default:
38511 0 : __Pyx_BufFmt_RaiseUnexpectedChar(ch);
38512 0 : return 0;
38513 : }
38514 : }
38515 3057 : static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) {
38516 3057 : switch (ch) {
38517 : case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
38518 0 : case 'h': case 'H': return sizeof(short);
38519 : case 'i': case 'I': return sizeof(int);
38520 : case 'l': case 'L': return sizeof(long);
38521 : #ifdef HAVE_LONG_LONG
38522 : case 'q': case 'Q': return sizeof(PY_LONG_LONG);
38523 : #endif
38524 0 : case 'f': return sizeof(float) * (is_complex ? 2 : 1);
38525 462 : case 'd': return sizeof(double) * (is_complex ? 2 : 1);
38526 0 : case 'g': return sizeof(long double) * (is_complex ? 2 : 1);
38527 : case 'O': case 'P': return sizeof(void*);
38528 0 : default: {
38529 0 : __Pyx_BufFmt_RaiseUnexpectedChar(ch);
38530 0 : return 0;
38531 : }
38532 : }
38533 : }
38534 : typedef struct { char c; short x; } __Pyx_st_short;
38535 : typedef struct { char c; int x; } __Pyx_st_int;
38536 : typedef struct { char c; long x; } __Pyx_st_long;
38537 : typedef struct { char c; float x; } __Pyx_st_float;
38538 : typedef struct { char c; double x; } __Pyx_st_double;
38539 : typedef struct { char c; long double x; } __Pyx_st_longdouble;
38540 : typedef struct { char c; void *x; } __Pyx_st_void_p;
38541 : #ifdef HAVE_LONG_LONG
38542 : typedef struct { char c; PY_LONG_LONG x; } __Pyx_st_longlong;
38543 : #endif
38544 3057 : static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, int is_complex) {
38545 3057 : CYTHON_UNUSED_VAR(is_complex);
38546 3057 : switch (ch) {
38547 : case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
38548 0 : case 'h': case 'H': return sizeof(__Pyx_st_short) - sizeof(short);
38549 : case 'i': case 'I': return sizeof(__Pyx_st_int) - sizeof(int);
38550 : case 'l': case 'L': return sizeof(__Pyx_st_long) - sizeof(long);
38551 : #ifdef HAVE_LONG_LONG
38552 : case 'q': case 'Q': return sizeof(__Pyx_st_longlong) - sizeof(PY_LONG_LONG);
38553 : #endif
38554 : case 'f': return sizeof(__Pyx_st_float) - sizeof(float);
38555 : case 'd': return sizeof(__Pyx_st_double) - sizeof(double);
38556 0 : case 'g': return sizeof(__Pyx_st_longdouble) - sizeof(long double);
38557 : case 'P': case 'O': return sizeof(__Pyx_st_void_p) - sizeof(void*);
38558 0 : default:
38559 0 : __Pyx_BufFmt_RaiseUnexpectedChar(ch);
38560 0 : return 0;
38561 : }
38562 : }
38563 : /* These are for computing the padding at the end of the struct to align
38564 : on the first member of the struct. This will probably the same as above,
38565 : but we don't have any guarantees.
38566 : */
38567 : typedef struct { short x; char c; } __Pyx_pad_short;
38568 : typedef struct { int x; char c; } __Pyx_pad_int;
38569 : typedef struct { long x; char c; } __Pyx_pad_long;
38570 : typedef struct { float x; char c; } __Pyx_pad_float;
38571 : typedef struct { double x; char c; } __Pyx_pad_double;
38572 : typedef struct { long double x; char c; } __Pyx_pad_longdouble;
38573 : typedef struct { void *x; char c; } __Pyx_pad_void_p;
38574 : #ifdef HAVE_LONG_LONG
38575 : typedef struct { PY_LONG_LONG x; char c; } __Pyx_pad_longlong;
38576 : #endif
38577 3057 : static size_t __Pyx_BufFmt_TypeCharToPadding(char ch, int is_complex) {
38578 3057 : CYTHON_UNUSED_VAR(is_complex);
38579 3057 : switch (ch) {
38580 : case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
38581 0 : case 'h': case 'H': return sizeof(__Pyx_pad_short) - sizeof(short);
38582 : case 'i': case 'I': return sizeof(__Pyx_pad_int) - sizeof(int);
38583 : case 'l': case 'L': return sizeof(__Pyx_pad_long) - sizeof(long);
38584 : #ifdef HAVE_LONG_LONG
38585 : case 'q': case 'Q': return sizeof(__Pyx_pad_longlong) - sizeof(PY_LONG_LONG);
38586 : #endif
38587 : case 'f': return sizeof(__Pyx_pad_float) - sizeof(float);
38588 : case 'd': return sizeof(__Pyx_pad_double) - sizeof(double);
38589 0 : case 'g': return sizeof(__Pyx_pad_longdouble) - sizeof(long double);
38590 : case 'P': case 'O': return sizeof(__Pyx_pad_void_p) - sizeof(void*);
38591 0 : default:
38592 0 : __Pyx_BufFmt_RaiseUnexpectedChar(ch);
38593 0 : return 0;
38594 : }
38595 : }
38596 3057 : static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) {
38597 3057 : switch (ch) {
38598 : case 'c':
38599 : return 'H';
38600 3 : case 'b': case 'h': case 'i':
38601 : case 'l': case 'q': case 's': case 'p':
38602 3 : return 'I';
38603 2592 : case '?': case 'B': case 'H': case 'I': case 'L': case 'Q':
38604 2592 : return 'U';
38605 462 : case 'f': case 'd': case 'g':
38606 462 : return (is_complex ? 'C' : 'R');
38607 0 : case 'O':
38608 0 : return 'O';
38609 0 : case 'P':
38610 0 : return 'P';
38611 0 : default: {
38612 0 : __Pyx_BufFmt_RaiseUnexpectedChar(ch);
38613 0 : return 0;
38614 : }
38615 : }
38616 : }
38617 0 : static void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) {
38618 0 : if (ctx->head == NULL || ctx->head->field == &ctx->root) {
38619 0 : const char* expected;
38620 0 : const char* quote;
38621 0 : if (ctx->head == NULL) {
38622 : expected = "end";
38623 : quote = "";
38624 : } else {
38625 0 : expected = ctx->head->field->type->name;
38626 0 : quote = "'";
38627 : }
38628 0 : PyErr_Format(PyExc_ValueError,
38629 : "Buffer dtype mismatch, expected %s%s%s but got %s",
38630 : quote, expected, quote,
38631 0 : __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex));
38632 : } else {
38633 0 : __Pyx_StructField* field = ctx->head->field;
38634 0 : __Pyx_StructField* parent = (ctx->head - 1)->field;
38635 0 : PyErr_Format(PyExc_ValueError,
38636 : "Buffer dtype mismatch, expected '%s' but got %s in '%s.%s'",
38637 0 : field->type->name, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex),
38638 0 : parent->type->name, field->name);
38639 : }
38640 0 : }
38641 6114 : static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) {
38642 6114 : char group;
38643 6114 : size_t size, offset, arraysize = 1;
38644 6114 : if (ctx->enc_type == 0) return 0;
38645 3057 : if (ctx->head->field->type->arraysize[0]) {
38646 0 : int i, ndim = 0;
38647 0 : if (ctx->enc_type == 's' || ctx->enc_type == 'p') {
38648 0 : ctx->is_valid_array = ctx->head->field->type->ndim == 1;
38649 0 : ndim = 1;
38650 0 : if (ctx->enc_count != ctx->head->field->type->arraysize[0]) {
38651 0 : PyErr_Format(PyExc_ValueError,
38652 : "Expected a dimension of size %zu, got %zu",
38653 : ctx->head->field->type->arraysize[0], ctx->enc_count);
38654 0 : return -1;
38655 : }
38656 : }
38657 0 : if (!ctx->is_valid_array) {
38658 0 : PyErr_Format(PyExc_ValueError, "Expected %d dimensions, got %d",
38659 : ctx->head->field->type->ndim, ndim);
38660 0 : return -1;
38661 : }
38662 0 : for (i = 0; i < ctx->head->field->type->ndim; i++) {
38663 0 : arraysize *= ctx->head->field->type->arraysize[i];
38664 : }
38665 0 : ctx->is_valid_array = 0;
38666 0 : ctx->enc_count = 1;
38667 : }
38668 3057 : group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex);
38669 3057 : do {
38670 3057 : __Pyx_StructField* field = ctx->head->field;
38671 3057 : __Pyx_TypeInfo* type = field->type;
38672 3057 : if (ctx->enc_packmode == '@' || ctx->enc_packmode == '^') {
38673 3057 : size = __Pyx_BufFmt_TypeCharToNativeSize(ctx->enc_type, ctx->is_complex);
38674 : } else {
38675 0 : size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex);
38676 : }
38677 3057 : if (ctx->enc_packmode == '@') {
38678 3057 : size_t align_at = __Pyx_BufFmt_TypeCharToAlignment(ctx->enc_type, ctx->is_complex);
38679 3057 : size_t align_mod_offset;
38680 3057 : if (align_at == 0) return -1;
38681 3057 : align_mod_offset = ctx->fmt_offset % align_at;
38682 3057 : if (align_mod_offset > 0) ctx->fmt_offset += align_at - align_mod_offset;
38683 3057 : if (ctx->struct_alignment == 0)
38684 3057 : ctx->struct_alignment = __Pyx_BufFmt_TypeCharToPadding(ctx->enc_type,
38685 : ctx->is_complex);
38686 : }
38687 3057 : if (type->size != size || type->typegroup != group) {
38688 0 : if (type->typegroup == 'C' && type->fields != NULL) {
38689 0 : size_t parent_offset = ctx->head->parent_offset + field->offset;
38690 0 : ++ctx->head;
38691 0 : ctx->head->field = type->fields;
38692 0 : ctx->head->parent_offset = parent_offset;
38693 0 : continue;
38694 : }
38695 0 : if ((type->typegroup == 'H' || group == 'H') && type->size == size) {
38696 : } else {
38697 0 : __Pyx_BufFmt_RaiseExpected(ctx);
38698 0 : return -1;
38699 : }
38700 : }
38701 3057 : offset = ctx->head->parent_offset + field->offset;
38702 3057 : if (ctx->fmt_offset != offset) {
38703 0 : PyErr_Format(PyExc_ValueError,
38704 : "Buffer dtype mismatch; next field is at offset %" CYTHON_FORMAT_SSIZE_T "d but %" CYTHON_FORMAT_SSIZE_T "d expected",
38705 : (Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset);
38706 0 : return -1;
38707 : }
38708 3057 : ctx->fmt_offset += size;
38709 3057 : if (arraysize)
38710 3057 : ctx->fmt_offset += (arraysize - 1) * size;
38711 3057 : --ctx->enc_count;
38712 3057 : while (1) {
38713 3057 : if (field == &ctx->root) {
38714 3057 : ctx->head = NULL;
38715 3057 : if (ctx->enc_count != 0) {
38716 0 : __Pyx_BufFmt_RaiseExpected(ctx);
38717 0 : return -1;
38718 : }
38719 : break;
38720 : }
38721 0 : ctx->head->field = ++field;
38722 0 : if (field->type == NULL) {
38723 0 : --ctx->head;
38724 0 : field = ctx->head->field;
38725 0 : continue;
38726 0 : } else if (field->type->typegroup == 'S') {
38727 0 : size_t parent_offset = ctx->head->parent_offset + field->offset;
38728 0 : if (field->type->fields->type == NULL) continue;
38729 0 : field = field->type->fields;
38730 0 : ++ctx->head;
38731 0 : ctx->head->field = field;
38732 0 : ctx->head->parent_offset = parent_offset;
38733 0 : break;
38734 : } else {
38735 : break;
38736 : }
38737 : }
38738 3057 : } while (ctx->enc_count);
38739 3057 : ctx->enc_type = 0;
38740 3057 : ctx->is_complex = 0;
38741 3057 : return 0;
38742 : }
38743 : static int
38744 0 : __pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp)
38745 : {
38746 0 : const char *ts = *tsp;
38747 0 : int i = 0, number, ndim;
38748 0 : ++ts;
38749 0 : if (ctx->new_count != 1) {
38750 0 : PyErr_SetString(PyExc_ValueError,
38751 : "Cannot handle repeated arrays in format string");
38752 0 : return -1;
38753 : }
38754 0 : if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return -1;
38755 0 : ndim = ctx->head->field->type->ndim;
38756 0 : while (*ts && *ts != ')') {
38757 0 : switch (*ts) {
38758 0 : case ' ': case '\f': case '\r': case '\n': case '\t': case '\v': continue;
38759 0 : default: break;
38760 : }
38761 0 : number = __Pyx_BufFmt_ExpectNumber(&ts);
38762 0 : if (number == -1) return -1;
38763 0 : if (i < ndim && (size_t) number != ctx->head->field->type->arraysize[i]) {
38764 0 : PyErr_Format(PyExc_ValueError,
38765 : "Expected a dimension of size %zu, got %d",
38766 : ctx->head->field->type->arraysize[i], number);
38767 0 : return -1;
38768 : }
38769 0 : if (*ts != ',' && *ts != ')') {
38770 0 : PyErr_Format(PyExc_ValueError,
38771 : "Expected a comma in format string, got '%c'", *ts);
38772 0 : return -1;
38773 : }
38774 0 : if (*ts == ',') ts++;
38775 0 : i++;
38776 : }
38777 0 : if (i != ndim) {
38778 0 : PyErr_Format(PyExc_ValueError, "Expected %d dimension(s), got %d",
38779 0 : ctx->head->field->type->ndim, i);
38780 0 : return -1;
38781 : }
38782 0 : if (!*ts) {
38783 0 : PyErr_SetString(PyExc_ValueError,
38784 : "Unexpected end of format string, expected ')'");
38785 0 : return -1;
38786 : }
38787 0 : ctx->is_valid_array = 1;
38788 0 : ctx->new_count = 1;
38789 0 : *tsp = ++ts;
38790 0 : return 0;
38791 : }
38792 3057 : static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts) {
38793 3057 : int got_Z = 0;
38794 6114 : while (1) {
38795 6114 : switch(*ts) {
38796 3057 : case 0:
38797 3057 : if (ctx->enc_type != 0 && ctx->head == NULL) {
38798 0 : __Pyx_BufFmt_RaiseExpected(ctx);
38799 0 : return NULL;
38800 : }
38801 3057 : if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
38802 3057 : if (ctx->head != NULL) {
38803 0 : __Pyx_BufFmt_RaiseExpected(ctx);
38804 0 : return NULL;
38805 : }
38806 : return ts;
38807 0 : case ' ':
38808 : case '\r':
38809 : case '\n':
38810 0 : ++ts;
38811 0 : break;
38812 : case '<':
38813 0 : if (!__Pyx_Is_Little_Endian()) {
38814 : PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler");
38815 : return NULL;
38816 : }
38817 0 : ctx->new_packmode = '=';
38818 0 : ++ts;
38819 0 : break;
38820 : case '>':
38821 : case '!':
38822 0 : if (__Pyx_Is_Little_Endian()) {
38823 0 : PyErr_SetString(PyExc_ValueError, "Big-endian buffer not supported on little-endian compiler");
38824 0 : return NULL;
38825 : }
38826 : ctx->new_packmode = '=';
38827 : ++ts;
38828 : break;
38829 0 : case '=':
38830 : case '@':
38831 : case '^':
38832 0 : ctx->new_packmode = *ts++;
38833 0 : break;
38834 0 : case 'T':
38835 : {
38836 0 : const char* ts_after_sub;
38837 0 : size_t i, struct_count = ctx->new_count;
38838 0 : size_t struct_alignment = ctx->struct_alignment;
38839 0 : ctx->new_count = 1;
38840 0 : ++ts;
38841 0 : if (*ts != '{') {
38842 0 : PyErr_SetString(PyExc_ValueError, "Buffer acquisition: Expected '{' after 'T'");
38843 0 : return NULL;
38844 : }
38845 0 : if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
38846 0 : ctx->enc_type = 0;
38847 0 : ctx->enc_count = 0;
38848 0 : ctx->struct_alignment = 0;
38849 0 : ++ts;
38850 0 : ts_after_sub = ts;
38851 0 : for (i = 0; i != struct_count; ++i) {
38852 0 : ts_after_sub = __Pyx_BufFmt_CheckString(ctx, ts);
38853 0 : if (!ts_after_sub) return NULL;
38854 : }
38855 0 : ts = ts_after_sub;
38856 0 : if (struct_alignment) ctx->struct_alignment = struct_alignment;
38857 : }
38858 : break;
38859 0 : case '}':
38860 : {
38861 0 : size_t alignment = ctx->struct_alignment;
38862 0 : ++ts;
38863 0 : if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
38864 0 : ctx->enc_type = 0;
38865 0 : if (alignment && ctx->fmt_offset % alignment) {
38866 0 : ctx->fmt_offset += alignment - (ctx->fmt_offset % alignment);
38867 : }
38868 : }
38869 : return ts;
38870 0 : case 'x':
38871 0 : if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
38872 0 : ctx->fmt_offset += ctx->new_count;
38873 0 : ctx->new_count = 1;
38874 0 : ctx->enc_count = 0;
38875 0 : ctx->enc_type = 0;
38876 0 : ctx->enc_packmode = ctx->new_packmode;
38877 0 : ++ts;
38878 0 : break;
38879 0 : case 'Z':
38880 0 : got_Z = 1;
38881 0 : ++ts;
38882 0 : if (*ts != 'f' && *ts != 'd' && *ts != 'g') {
38883 0 : __Pyx_BufFmt_RaiseUnexpectedChar('Z');
38884 0 : return NULL;
38885 : }
38886 3057 : CYTHON_FALLTHROUGH;
38887 : case '?': case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I':
38888 : case 'l': case 'L': case 'q': case 'Q':
38889 : case 'f': case 'd': case 'g':
38890 : case 'O': case 'p':
38891 3057 : if ((ctx->enc_type == *ts) && (got_Z == ctx->is_complex) &&
38892 0 : (ctx->enc_packmode == ctx->new_packmode) && (!ctx->is_valid_array)) {
38893 0 : ctx->enc_count += ctx->new_count;
38894 0 : ctx->new_count = 1;
38895 0 : got_Z = 0;
38896 0 : ++ts;
38897 0 : break;
38898 : }
38899 3057 : CYTHON_FALLTHROUGH;
38900 : case 's':
38901 3057 : if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
38902 3057 : ctx->enc_count = ctx->new_count;
38903 3057 : ctx->enc_packmode = ctx->new_packmode;
38904 3057 : ctx->enc_type = *ts;
38905 3057 : ctx->is_complex = got_Z;
38906 3057 : ++ts;
38907 3057 : ctx->new_count = 1;
38908 3057 : got_Z = 0;
38909 3057 : break;
38910 0 : case ':':
38911 0 : ++ts;
38912 0 : while(*ts != ':') ++ts;
38913 0 : ++ts;
38914 0 : break;
38915 0 : case '(':
38916 0 : if (__pyx_buffmt_parse_array(ctx, &ts) < 0) return NULL;
38917 : break;
38918 0 : default:
38919 : {
38920 0 : int number = __Pyx_BufFmt_ExpectNumber(&ts);
38921 0 : if (number == -1) return NULL;
38922 0 : ctx->new_count = (size_t)number;
38923 : }
38924 : }
38925 : }
38926 : }
38927 :
38928 : /* TypeInfoCompare */
38929 : static int
38930 0 : __pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b)
38931 : {
38932 0 : int i;
38933 0 : if (!a || !b)
38934 : return 0;
38935 0 : if (a == b)
38936 : return 1;
38937 0 : if (a->size != b->size || a->typegroup != b->typegroup ||
38938 0 : a->is_unsigned != b->is_unsigned || a->ndim != b->ndim) {
38939 0 : if (a->typegroup == 'H' || b->typegroup == 'H') {
38940 0 : return a->size == b->size;
38941 : } else {
38942 : return 0;
38943 : }
38944 : }
38945 0 : if (a->ndim) {
38946 0 : for (i = 0; i < a->ndim; i++)
38947 0 : if (a->arraysize[i] != b->arraysize[i])
38948 : return 0;
38949 : }
38950 0 : if (a->typegroup == 'S') {
38951 0 : if (a->flags != b->flags)
38952 : return 0;
38953 0 : if (a->fields || b->fields) {
38954 0 : if (!(a->fields && b->fields))
38955 : return 0;
38956 0 : for (i = 0; a->fields[i].type && b->fields[i].type; i++) {
38957 0 : __Pyx_StructField *field_a = a->fields + i;
38958 0 : __Pyx_StructField *field_b = b->fields + i;
38959 0 : if (field_a->offset != field_b->offset ||
38960 0 : !__pyx_typeinfo_cmp(field_a->type, field_b->type))
38961 0 : return 0;
38962 : }
38963 0 : return !a->fields[i].type && !b->fields[i].type;
38964 : }
38965 : }
38966 : return 1;
38967 : }
38968 :
38969 : /* MemviewSliceValidateAndInit */
38970 : static int
38971 5474 : __pyx_check_strides(Py_buffer *buf, int dim, int ndim, int spec)
38972 : {
38973 5474 : if (buf->shape[dim] <= 1)
38974 : return 1;
38975 4861 : if (buf->strides) {
38976 4861 : if (spec & __Pyx_MEMVIEW_CONTIG) {
38977 2356 : if (spec & (__Pyx_MEMVIEW_PTR|__Pyx_MEMVIEW_FULL)) {
38978 0 : if (unlikely(buf->strides[dim] != sizeof(void *))) {
38979 0 : PyErr_Format(PyExc_ValueError,
38980 : "Buffer is not indirectly contiguous "
38981 : "in dimension %d.", dim);
38982 0 : goto fail;
38983 : }
38984 2356 : } else if (unlikely(buf->strides[dim] != buf->itemsize)) {
38985 0 : PyErr_SetString(PyExc_ValueError,
38986 : "Buffer and memoryview are not contiguous "
38987 : "in the same dimension.");
38988 0 : goto fail;
38989 : }
38990 : }
38991 4861 : if (spec & __Pyx_MEMVIEW_FOLLOW) {
38992 2111 : Py_ssize_t stride = buf->strides[dim];
38993 2111 : if (stride < 0)
38994 : stride = -stride;
38995 2111 : if (unlikely(stride < buf->itemsize)) {
38996 0 : PyErr_SetString(PyExc_ValueError,
38997 : "Buffer and memoryview are not contiguous "
38998 : "in the same dimension.");
38999 0 : goto fail;
39000 : }
39001 : }
39002 : } else {
39003 0 : if (unlikely(spec & __Pyx_MEMVIEW_CONTIG && dim != ndim - 1)) {
39004 0 : PyErr_Format(PyExc_ValueError,
39005 : "C-contiguous buffer is not contiguous in "
39006 : "dimension %d", dim);
39007 0 : goto fail;
39008 0 : } else if (unlikely(spec & (__Pyx_MEMVIEW_PTR))) {
39009 0 : PyErr_Format(PyExc_ValueError,
39010 : "C-contiguous buffer is not indirect in "
39011 : "dimension %d", dim);
39012 0 : goto fail;
39013 0 : } else if (unlikely(buf->suboffsets)) {
39014 0 : PyErr_SetString(PyExc_ValueError,
39015 : "Buffer exposes suboffsets but no strides");
39016 0 : goto fail;
39017 : }
39018 : }
39019 : return 1;
39020 : fail:
39021 : return 0;
39022 : }
39023 : static int
39024 5474 : __pyx_check_suboffsets(Py_buffer *buf, int dim, int ndim, int spec)
39025 : {
39026 5474 : CYTHON_UNUSED_VAR(ndim);
39027 5474 : if (spec & __Pyx_MEMVIEW_DIRECT) {
39028 5474 : if (unlikely(buf->suboffsets && buf->suboffsets[dim] >= 0)) {
39029 0 : PyErr_Format(PyExc_ValueError,
39030 : "Buffer not compatible with direct access "
39031 : "in dimension %d.", dim);
39032 0 : goto fail;
39033 : }
39034 : }
39035 5474 : if (spec & __Pyx_MEMVIEW_PTR) {
39036 0 : if (unlikely(!buf->suboffsets || (buf->suboffsets[dim] < 0))) {
39037 0 : PyErr_Format(PyExc_ValueError,
39038 : "Buffer is not indirectly accessible "
39039 : "in dimension %d.", dim);
39040 0 : goto fail;
39041 : }
39042 : }
39043 : return 1;
39044 : fail:
39045 : return 0;
39046 : }
39047 : static int
39048 3046 : __pyx_verify_contig(Py_buffer *buf, int ndim, int c_or_f_flag)
39049 : {
39050 3046 : int i;
39051 3046 : if (c_or_f_flag & __Pyx_IS_F_CONTIG) {
39052 : Py_ssize_t stride = 1;
39053 0 : for (i = 0; i < ndim; i++) {
39054 0 : if (unlikely(stride * buf->itemsize != buf->strides[i] && buf->shape[i] > 1)) {
39055 0 : PyErr_SetString(PyExc_ValueError,
39056 : "Buffer not fortran contiguous.");
39057 0 : goto fail;
39058 : }
39059 0 : stride = stride * buf->shape[i];
39060 : }
39061 3046 : } else if (c_or_f_flag & __Pyx_IS_C_CONTIG) {
39062 2652 : Py_ssize_t stride = 1;
39063 7732 : for (i = ndim - 1; i >- 1; i--) {
39064 5080 : if (unlikely(stride * buf->itemsize != buf->strides[i] && buf->shape[i] > 1)) {
39065 0 : PyErr_SetString(PyExc_ValueError,
39066 : "Buffer not C contiguous.");
39067 0 : goto fail;
39068 : }
39069 5080 : stride = stride * buf->shape[i];
39070 : }
39071 : }
39072 : return 1;
39073 : fail:
39074 : return 0;
39075 : }
39076 3057 : static int __Pyx_ValidateAndInit_memviewslice(
39077 : int *axes_specs,
39078 : int c_or_f_flag,
39079 : int buf_flags,
39080 : int ndim,
39081 : __Pyx_TypeInfo *dtype,
39082 : __Pyx_BufFmt_StackElem stack[],
39083 : __Pyx_memviewslice *memviewslice,
39084 : PyObject *original_obj)
39085 : {
39086 3057 : struct __pyx_memoryview_obj *memview, *new_memview;
39087 : __Pyx_RefNannyDeclarations
39088 3057 : Py_buffer *buf;
39089 3057 : int i, spec = 0, retval = -1;
39090 3057 : __Pyx_BufFmt_Context ctx;
39091 3057 : int from_memoryview = __pyx_memoryview_check(original_obj);
39092 3057 : __Pyx_RefNannySetupContext("ValidateAndInit_memviewslice", 0);
39093 3057 : if (from_memoryview && __pyx_typeinfo_cmp(dtype, ((struct __pyx_memoryview_obj *)
39094 : original_obj)->typeinfo)) {
39095 : memview = (struct __pyx_memoryview_obj *) original_obj;
39096 : new_memview = NULL;
39097 : } else {
39098 3057 : memview = (struct __pyx_memoryview_obj *) __pyx_memoryview_new(
39099 : original_obj, buf_flags, 0, dtype);
39100 3057 : new_memview = memview;
39101 3057 : if (unlikely(!memview))
39102 0 : goto fail;
39103 : }
39104 3057 : buf = &memview->view;
39105 3057 : if (unlikely(buf->ndim != ndim)) {
39106 0 : PyErr_Format(PyExc_ValueError,
39107 : "Buffer has wrong number of dimensions (expected %d, got %d)",
39108 : ndim, buf->ndim);
39109 0 : goto fail;
39110 : }
39111 3057 : if (new_memview) {
39112 3057 : __Pyx_BufFmt_Init(&ctx, stack, dtype);
39113 3057 : if (unlikely(!__Pyx_BufFmt_CheckString(&ctx, buf->format))) goto fail;
39114 : }
39115 3057 : if (unlikely((unsigned) buf->itemsize != dtype->size)) {
39116 0 : PyErr_Format(PyExc_ValueError,
39117 : "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "u byte%s) "
39118 : "does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "u byte%s)",
39119 : buf->itemsize,
39120 : (buf->itemsize > 1) ? "s" : "",
39121 : dtype->name,
39122 : dtype->size,
39123 : (dtype->size > 1) ? "s" : "");
39124 0 : goto fail;
39125 : }
39126 3057 : if (buf->len > 0) {
39127 8520 : for (i = 0; i < ndim; i++) {
39128 5474 : spec = axes_specs[i];
39129 5474 : if (unlikely(!__pyx_check_strides(buf, i, ndim, spec)))
39130 0 : goto fail;
39131 5474 : if (unlikely(!__pyx_check_suboffsets(buf, i, ndim, spec)))
39132 0 : goto fail;
39133 : }
39134 3046 : if (unlikely(buf->strides && !__pyx_verify_contig(buf, ndim, c_or_f_flag)))
39135 0 : goto fail;
39136 : }
39137 3057 : if (unlikely(__Pyx_init_memviewslice(memview, ndim, memviewslice,
39138 : new_memview != NULL) == -1)) {
39139 0 : goto fail;
39140 : }
39141 3057 : retval = 0;
39142 3057 : goto no_fail;
39143 0 : fail:
39144 0 : Py_XDECREF(new_memview);
39145 0 : retval = -1;
39146 3057 : no_fail:
39147 3057 : __Pyx_RefNannyFinishContext();
39148 3057 : return retval;
39149 : }
39150 :
39151 : /* ObjectToMemviewSlice */
39152 1009 : static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_5numpy_uint32_t(PyObject *obj, int writable_flag) {
39153 1009 : __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
39154 1009 : __Pyx_BufFmt_StackElem stack[1];
39155 1009 : int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_FOLLOW), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) };
39156 1009 : int retcode;
39157 1009 : if (obj == Py_None) {
39158 0 : result.memview = (struct __pyx_memoryview_obj *) Py_None;
39159 0 : return result;
39160 : }
39161 1009 : retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_C_CONTIG,
39162 : (PyBUF_C_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 2,
39163 : &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint32_t, stack,
39164 : &result, obj);
39165 1009 : if (unlikely(retcode == -1))
39166 0 : goto __pyx_fail;
39167 1009 : return result;
39168 0 : __pyx_fail:
39169 0 : result.memview = NULL;
39170 0 : result.data = NULL;
39171 0 : return result;
39172 : }
39173 :
39174 : /* ObjectToMemviewSlice */
39175 29 : static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_5numpy_uint64_t(PyObject *obj, int writable_flag) {
39176 29 : __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
39177 29 : __Pyx_BufFmt_StackElem stack[1];
39178 29 : int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_FOLLOW), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) };
39179 29 : int retcode;
39180 29 : if (obj == Py_None) {
39181 0 : result.memview = (struct __pyx_memoryview_obj *) Py_None;
39182 0 : return result;
39183 : }
39184 29 : retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_C_CONTIG,
39185 : (PyBUF_C_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 2,
39186 : &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint64_t, stack,
39187 : &result, obj);
39188 29 : if (unlikely(retcode == -1))
39189 0 : goto __pyx_fail;
39190 29 : return result;
39191 0 : __pyx_fail:
39192 0 : result.memview = NULL;
39193 0 : result.data = NULL;
39194 0 : return result;
39195 : }
39196 :
39197 : /* ObjectToMemviewSlice */
39198 447 : static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_5numpy_uint32_t__const__(PyObject *obj, int writable_flag) {
39199 447 : __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
39200 447 : __Pyx_BufFmt_StackElem stack[1];
39201 447 : int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_FOLLOW), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) };
39202 447 : int retcode;
39203 447 : if (obj == Py_None) {
39204 0 : result.memview = (struct __pyx_memoryview_obj *) Py_None;
39205 0 : return result;
39206 : }
39207 447 : retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_C_CONTIG,
39208 : (PyBUF_C_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 2,
39209 : &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint32_t__const__, stack,
39210 : &result, obj);
39211 447 : if (unlikely(retcode == -1))
39212 0 : goto __pyx_fail;
39213 447 : return result;
39214 0 : __pyx_fail:
39215 0 : result.memview = NULL;
39216 0 : result.data = NULL;
39217 0 : return result;
39218 : }
39219 :
39220 : /* ObjectToMemviewSlice */
39221 8 : static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_5numpy_uint64_t__const__(PyObject *obj, int writable_flag) {
39222 8 : __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
39223 8 : __Pyx_BufFmt_StackElem stack[1];
39224 8 : int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_FOLLOW), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) };
39225 8 : int retcode;
39226 8 : if (obj == Py_None) {
39227 0 : result.memview = (struct __pyx_memoryview_obj *) Py_None;
39228 0 : return result;
39229 : }
39230 8 : retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_C_CONTIG,
39231 : (PyBUF_C_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 2,
39232 : &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint64_t__const__, stack,
39233 : &result, obj);
39234 8 : if (unlikely(retcode == -1))
39235 0 : goto __pyx_fail;
39236 8 : return result;
39237 0 : __pyx_fail:
39238 0 : result.memview = NULL;
39239 0 : result.data = NULL;
39240 0 : return result;
39241 : }
39242 :
39243 : /* ObjectToMemviewSlice */
39244 241 : static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_d_d_dc_nn___pyx_t_5numpy_uint32_t(PyObject *obj, int writable_flag) {
39245 241 : __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
39246 241 : __Pyx_BufFmt_StackElem stack[1];
39247 241 : int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_FOLLOW), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_FOLLOW), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) };
39248 241 : int retcode;
39249 241 : if (obj == Py_None) {
39250 0 : result.memview = (struct __pyx_memoryview_obj *) Py_None;
39251 0 : return result;
39252 : }
39253 241 : retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_C_CONTIG,
39254 : (PyBUF_C_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 3,
39255 : &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint32_t, stack,
39256 : &result, obj);
39257 241 : if (unlikely(retcode == -1))
39258 0 : goto __pyx_fail;
39259 241 : return result;
39260 0 : __pyx_fail:
39261 0 : result.memview = NULL;
39262 0 : result.data = NULL;
39263 0 : return result;
39264 : }
39265 :
39266 : /* ObjectToMemviewSlice */
39267 9 : static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_d_d_dc_nn___pyx_t_5numpy_uint64_t(PyObject *obj, int writable_flag) {
39268 9 : __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
39269 9 : __Pyx_BufFmt_StackElem stack[1];
39270 9 : int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_FOLLOW), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_FOLLOW), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) };
39271 9 : int retcode;
39272 9 : if (obj == Py_None) {
39273 0 : result.memview = (struct __pyx_memoryview_obj *) Py_None;
39274 0 : return result;
39275 : }
39276 9 : retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_C_CONTIG,
39277 : (PyBUF_C_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 3,
39278 : &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint64_t, stack,
39279 : &result, obj);
39280 9 : if (unlikely(retcode == -1))
39281 0 : goto __pyx_fail;
39282 9 : return result;
39283 0 : __pyx_fail:
39284 0 : result.memview = NULL;
39285 0 : result.data = NULL;
39286 0 : return result;
39287 : }
39288 :
39289 : /* CIntFromPyVerify */
39290 : #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
39291 : __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
39292 : #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
39293 : __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
39294 : #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
39295 : {\
39296 : func_type value = func_value;\
39297 : if (sizeof(target_type) < sizeof(func_type)) {\
39298 : if (unlikely(value != (func_type) (target_type) value)) {\
39299 : func_type zero = 0;\
39300 : if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
39301 : return (target_type) -1;\
39302 : if (is_unsigned && unlikely(value < zero))\
39303 : goto raise_neg_overflow;\
39304 : else\
39305 : goto raise_overflow;\
39306 : }\
39307 : }\
39308 : return (target_type) value;\
39309 : }
39310 :
39311 : /* ObjectToMemviewSlice */
39312 447 : static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_uint32_t(PyObject *obj, int writable_flag) {
39313 447 : __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
39314 447 : __Pyx_BufFmt_StackElem stack[1];
39315 447 : int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) };
39316 447 : int retcode;
39317 447 : if (obj == Py_None) {
39318 0 : result.memview = (struct __pyx_memoryview_obj *) Py_None;
39319 0 : return result;
39320 : }
39321 447 : retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_C_CONTIG,
39322 : (PyBUF_C_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 1,
39323 : &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint32_t, stack,
39324 : &result, obj);
39325 447 : if (unlikely(retcode == -1))
39326 0 : goto __pyx_fail;
39327 447 : return result;
39328 0 : __pyx_fail:
39329 0 : result.memview = NULL;
39330 0 : result.data = NULL;
39331 0 : return result;
39332 : }
39333 :
39334 : /* ObjectToMemviewSlice */
39335 445 : static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn___pyx_t_5numpy_float64_t(PyObject *obj, int writable_flag) {
39336 445 : __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
39337 445 : __Pyx_BufFmt_StackElem stack[1];
39338 445 : int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_FOLLOW), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) };
39339 445 : int retcode;
39340 445 : if (obj == Py_None) {
39341 0 : result.memview = (struct __pyx_memoryview_obj *) Py_None;
39342 0 : return result;
39343 : }
39344 445 : retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_C_CONTIG,
39345 : (PyBUF_C_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 2,
39346 : &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, stack,
39347 : &result, obj);
39348 445 : if (unlikely(retcode == -1))
39349 0 : goto __pyx_fail;
39350 445 : return result;
39351 0 : __pyx_fail:
39352 0 : result.memview = NULL;
39353 0 : result.data = NULL;
39354 0 : return result;
39355 : }
39356 :
39357 : /* ObjectToMemviewSlice */
39358 8 : static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_uint64_t(PyObject *obj, int writable_flag) {
39359 8 : __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
39360 8 : __Pyx_BufFmt_StackElem stack[1];
39361 8 : int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) };
39362 8 : int retcode;
39363 8 : if (obj == Py_None) {
39364 0 : result.memview = (struct __pyx_memoryview_obj *) Py_None;
39365 0 : return result;
39366 : }
39367 8 : retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_C_CONTIG,
39368 : (PyBUF_C_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 1,
39369 : &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint64_t, stack,
39370 : &result, obj);
39371 8 : if (unlikely(retcode == -1))
39372 0 : goto __pyx_fail;
39373 8 : return result;
39374 0 : __pyx_fail:
39375 0 : result.memview = NULL;
39376 0 : result.data = NULL;
39377 0 : return result;
39378 : }
39379 :
39380 : /* ObjectToMemviewSlice */
39381 14 : static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_float_t__const__(PyObject *obj, int writable_flag) {
39382 14 : __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
39383 14 : __Pyx_BufFmt_StackElem stack[1];
39384 14 : int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) };
39385 14 : int retcode;
39386 14 : if (obj == Py_None) {
39387 0 : result.memview = (struct __pyx_memoryview_obj *) Py_None;
39388 0 : return result;
39389 : }
39390 14 : retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_C_CONTIG,
39391 : (PyBUF_C_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 1,
39392 : &__Pyx_TypeInfo_nn___pyx_t_5numpy_float_t__const__, stack,
39393 : &result, obj);
39394 14 : if (unlikely(retcode == -1))
39395 0 : goto __pyx_fail;
39396 14 : return result;
39397 0 : __pyx_fail:
39398 0 : result.memview = NULL;
39399 0 : result.data = NULL;
39400 0 : return result;
39401 : }
39402 :
39403 : /* ObjectToMemviewSlice */
39404 3 : static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_float_t(PyObject *obj, int writable_flag) {
39405 3 : __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
39406 3 : __Pyx_BufFmt_StackElem stack[1];
39407 3 : int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) };
39408 3 : int retcode;
39409 3 : if (obj == Py_None) {
39410 0 : result.memview = (struct __pyx_memoryview_obj *) Py_None;
39411 0 : return result;
39412 : }
39413 3 : retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_C_CONTIG,
39414 : (PyBUF_C_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 1,
39415 : &__Pyx_TypeInfo_nn___pyx_t_5numpy_float_t, stack,
39416 : &result, obj);
39417 3 : if (unlikely(retcode == -1))
39418 0 : goto __pyx_fail;
39419 3 : return result;
39420 0 : __pyx_fail:
39421 0 : result.memview = NULL;
39422 0 : result.data = NULL;
39423 0 : return result;
39424 : }
39425 :
39426 : /* ObjectToMemviewSlice */
39427 3 : static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_intp_t(PyObject *obj, int writable_flag) {
39428 3 : __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
39429 3 : __Pyx_BufFmt_StackElem stack[1];
39430 3 : int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) };
39431 3 : int retcode;
39432 3 : if (obj == Py_None) {
39433 0 : result.memview = (struct __pyx_memoryview_obj *) Py_None;
39434 0 : return result;
39435 : }
39436 3 : retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_C_CONTIG,
39437 : (PyBUF_C_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 1,
39438 : &__Pyx_TypeInfo_nn___pyx_t_5numpy_intp_t, stack,
39439 : &result, obj);
39440 3 : if (unlikely(retcode == -1))
39441 0 : goto __pyx_fail;
39442 3 : return result;
39443 0 : __pyx_fail:
39444 0 : result.memview = NULL;
39445 0 : result.data = NULL;
39446 0 : return result;
39447 : }
39448 :
39449 : /* PyUCS4InUnicode */
39450 : #if PY_VERSION_HEX < 0x03090000 || (defined(PyUnicode_WCHAR_KIND) && defined(PyUnicode_AS_UNICODE))
39451 : #if PY_VERSION_HEX < 0x03090000
39452 : #define __Pyx_PyUnicode_AS_UNICODE(op) PyUnicode_AS_UNICODE(op)
39453 : #define __Pyx_PyUnicode_GET_SIZE(op) PyUnicode_GET_SIZE(op)
39454 : #else
39455 : #define __Pyx_PyUnicode_AS_UNICODE(op) (((PyASCIIObject *)(op))->wstr)
39456 : #define __Pyx_PyUnicode_GET_SIZE(op) ((PyCompactUnicodeObject *)(op))->wstr_length
39457 : #endif
39458 : #if !defined(Py_UNICODE_SIZE) || Py_UNICODE_SIZE == 2
39459 : static int __Pyx_PyUnicodeBufferContainsUCS4_SP(Py_UNICODE* buffer, Py_ssize_t length, Py_UCS4 character) {
39460 : Py_UNICODE high_val, low_val;
39461 : Py_UNICODE* pos;
39462 : high_val = (Py_UNICODE) (0xD800 | (((character - 0x10000) >> 10) & ((1<<10)-1)));
39463 : low_val = (Py_UNICODE) (0xDC00 | ( (character - 0x10000) & ((1<<10)-1)));
39464 : for (pos=buffer; pos < buffer+length-1; pos++) {
39465 : if (unlikely((high_val == pos[0]) & (low_val == pos[1]))) return 1;
39466 : }
39467 : return 0;
39468 : }
39469 : #endif
39470 : static int __Pyx_PyUnicodeBufferContainsUCS4_BMP(Py_UNICODE* buffer, Py_ssize_t length, Py_UCS4 character) {
39471 : Py_UNICODE uchar;
39472 : Py_UNICODE* pos;
39473 : uchar = (Py_UNICODE) character;
39474 : for (pos=buffer; pos < buffer+length; pos++) {
39475 : if (unlikely(uchar == pos[0])) return 1;
39476 : }
39477 : return 0;
39478 : }
39479 : #endif
39480 : static CYTHON_INLINE int __Pyx_UnicodeContainsUCS4(PyObject* unicode, Py_UCS4 character) {
39481 : #if CYTHON_PEP393_ENABLED
39482 : const int kind = PyUnicode_KIND(unicode);
39483 : #ifdef PyUnicode_WCHAR_KIND
39484 : if (likely(kind != PyUnicode_WCHAR_KIND))
39485 : #endif
39486 : {
39487 : Py_ssize_t i;
39488 : const void* udata = PyUnicode_DATA(unicode);
39489 : const Py_ssize_t length = PyUnicode_GET_LENGTH(unicode);
39490 : for (i=0; i < length; i++) {
39491 : if (unlikely(character == PyUnicode_READ(kind, udata, i))) return 1;
39492 : }
39493 : return 0;
39494 : }
39495 : #elif PY_VERSION_HEX >= 0x03090000
39496 : #error Cannot use "UChar in Unicode" in Python 3.9 without PEP-393 unicode strings.
39497 : #elif !defined(PyUnicode_AS_UNICODE)
39498 : #error Cannot use "UChar in Unicode" in Python < 3.9 without Py_UNICODE support.
39499 : #endif
39500 : #if PY_VERSION_HEX < 0x03090000 || (defined(PyUnicode_WCHAR_KIND) && defined(PyUnicode_AS_UNICODE))
39501 : #if !defined(Py_UNICODE_SIZE) || Py_UNICODE_SIZE == 2
39502 : if ((sizeof(Py_UNICODE) == 2) && unlikely(character > 65535)) {
39503 : return __Pyx_PyUnicodeBufferContainsUCS4_SP(
39504 : __Pyx_PyUnicode_AS_UNICODE(unicode),
39505 : __Pyx_PyUnicode_GET_SIZE(unicode),
39506 : character);
39507 : } else
39508 : #endif
39509 : {
39510 : return __Pyx_PyUnicodeBufferContainsUCS4_BMP(
39511 : __Pyx_PyUnicode_AS_UNICODE(unicode),
39512 : __Pyx_PyUnicode_GET_SIZE(unicode),
39513 : character);
39514 : }
39515 : #endif
39516 : }
39517 :
39518 : /* ObjectToMemviewSlice */
39519 384 : static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint32_t(PyObject *obj, int writable_flag) {
39520 384 : __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
39521 384 : __Pyx_BufFmt_StackElem stack[1];
39522 384 : int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };
39523 384 : int retcode;
39524 384 : if (obj == Py_None) {
39525 0 : result.memview = (struct __pyx_memoryview_obj *) Py_None;
39526 0 : return result;
39527 : }
39528 384 : retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,
39529 : PyBUF_RECORDS_RO | writable_flag, 1,
39530 : &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint32_t, stack,
39531 : &result, obj);
39532 384 : if (unlikely(retcode == -1))
39533 0 : goto __pyx_fail;
39534 384 : return result;
39535 0 : __pyx_fail:
39536 0 : result.memview = NULL;
39537 0 : result.data = NULL;
39538 0 : return result;
39539 : }
39540 :
39541 : /* ObjectToMemviewSlice */
39542 10 : static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint64_t(PyObject *obj, int writable_flag) {
39543 10 : __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
39544 10 : __Pyx_BufFmt_StackElem stack[1];
39545 10 : int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };
39546 10 : int retcode;
39547 10 : if (obj == Py_None) {
39548 0 : result.memview = (struct __pyx_memoryview_obj *) Py_None;
39549 0 : return result;
39550 : }
39551 10 : retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,
39552 : PyBUF_RECORDS_RO | writable_flag, 1,
39553 : &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint64_t, stack,
39554 : &result, obj);
39555 10 : if (unlikely(retcode == -1))
39556 0 : goto __pyx_fail;
39557 10 : return result;
39558 0 : __pyx_fail:
39559 0 : result.memview = NULL;
39560 0 : result.data = NULL;
39561 0 : return result;
39562 : }
39563 :
39564 : /* Declarations */
39565 : #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
39566 : #ifdef __cplusplus
39567 : static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
39568 : return ::std::complex< float >(x, y);
39569 : }
39570 : #else
39571 : static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
39572 : return x + y*(__pyx_t_float_complex)_Complex_I;
39573 : }
39574 : #endif
39575 : #else
39576 : static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
39577 : __pyx_t_float_complex z;
39578 : z.real = x;
39579 : z.imag = y;
39580 : return z;
39581 : }
39582 : #endif
39583 :
39584 : /* Arithmetic */
39585 : #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
39586 : #else
39587 : static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
39588 : return (a.real == b.real) && (a.imag == b.imag);
39589 : }
39590 : static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
39591 : __pyx_t_float_complex z;
39592 : z.real = a.real + b.real;
39593 : z.imag = a.imag + b.imag;
39594 : return z;
39595 : }
39596 : static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
39597 : __pyx_t_float_complex z;
39598 : z.real = a.real - b.real;
39599 : z.imag = a.imag - b.imag;
39600 : return z;
39601 : }
39602 : static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
39603 : __pyx_t_float_complex z;
39604 : z.real = a.real * b.real - a.imag * b.imag;
39605 : z.imag = a.real * b.imag + a.imag * b.real;
39606 : return z;
39607 : }
39608 : #if 1
39609 : static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
39610 : if (b.imag == 0) {
39611 : return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
39612 : } else if (fabsf(b.real) >= fabsf(b.imag)) {
39613 : if (b.real == 0 && b.imag == 0) {
39614 : return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.imag);
39615 : } else {
39616 : float r = b.imag / b.real;
39617 : float s = (float)(1.0) / (b.real + b.imag * r);
39618 : return __pyx_t_float_complex_from_parts(
39619 : (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
39620 : }
39621 : } else {
39622 : float r = b.real / b.imag;
39623 : float s = (float)(1.0) / (b.imag + b.real * r);
39624 : return __pyx_t_float_complex_from_parts(
39625 : (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
39626 : }
39627 : }
39628 : #else
39629 : static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
39630 : if (b.imag == 0) {
39631 : return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
39632 : } else {
39633 : float denom = b.real * b.real + b.imag * b.imag;
39634 : return __pyx_t_float_complex_from_parts(
39635 : (a.real * b.real + a.imag * b.imag) / denom,
39636 : (a.imag * b.real - a.real * b.imag) / denom);
39637 : }
39638 : }
39639 : #endif
39640 : static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex a) {
39641 : __pyx_t_float_complex z;
39642 : z.real = -a.real;
39643 : z.imag = -a.imag;
39644 : return z;
39645 : }
39646 : static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex a) {
39647 : return (a.real == 0) && (a.imag == 0);
39648 : }
39649 : static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) {
39650 : __pyx_t_float_complex z;
39651 : z.real = a.real;
39652 : z.imag = -a.imag;
39653 : return z;
39654 : }
39655 : #if 1
39656 : static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex z) {
39657 : #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
39658 : return sqrtf(z.real*z.real + z.imag*z.imag);
39659 : #else
39660 : return hypotf(z.real, z.imag);
39661 : #endif
39662 : }
39663 : static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
39664 : __pyx_t_float_complex z;
39665 : float r, lnr, theta, z_r, z_theta;
39666 : if (b.imag == 0 && b.real == (int)b.real) {
39667 : if (b.real < 0) {
39668 : float denom = a.real * a.real + a.imag * a.imag;
39669 : a.real = a.real / denom;
39670 : a.imag = -a.imag / denom;
39671 : b.real = -b.real;
39672 : }
39673 : switch ((int)b.real) {
39674 : case 0:
39675 : z.real = 1;
39676 : z.imag = 0;
39677 : return z;
39678 : case 1:
39679 : return a;
39680 : case 2:
39681 : return __Pyx_c_prod_float(a, a);
39682 : case 3:
39683 : z = __Pyx_c_prod_float(a, a);
39684 : return __Pyx_c_prod_float(z, a);
39685 : case 4:
39686 : z = __Pyx_c_prod_float(a, a);
39687 : return __Pyx_c_prod_float(z, z);
39688 : }
39689 : }
39690 : if (a.imag == 0) {
39691 : if (a.real == 0) {
39692 : return a;
39693 : } else if ((b.imag == 0) && (a.real >= 0)) {
39694 : z.real = powf(a.real, b.real);
39695 : z.imag = 0;
39696 : return z;
39697 : } else if (a.real > 0) {
39698 : r = a.real;
39699 : theta = 0;
39700 : } else {
39701 : r = -a.real;
39702 : theta = atan2f(0.0, -1.0);
39703 : }
39704 : } else {
39705 : r = __Pyx_c_abs_float(a);
39706 : theta = atan2f(a.imag, a.real);
39707 : }
39708 : lnr = logf(r);
39709 : z_r = expf(lnr * b.real - theta * b.imag);
39710 : z_theta = theta * b.real + lnr * b.imag;
39711 : z.real = z_r * cosf(z_theta);
39712 : z.imag = z_r * sinf(z_theta);
39713 : return z;
39714 : }
39715 : #endif
39716 : #endif
39717 :
39718 : /* Declarations */
39719 : #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
39720 : #ifdef __cplusplus
39721 : static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
39722 : return ::std::complex< double >(x, y);
39723 : }
39724 : #else
39725 : static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
39726 : return x + y*(__pyx_t_double_complex)_Complex_I;
39727 : }
39728 : #endif
39729 : #else
39730 : static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
39731 : __pyx_t_double_complex z;
39732 : z.real = x;
39733 : z.imag = y;
39734 : return z;
39735 : }
39736 : #endif
39737 :
39738 : /* Arithmetic */
39739 : #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
39740 : #else
39741 : static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
39742 : return (a.real == b.real) && (a.imag == b.imag);
39743 : }
39744 : static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
39745 : __pyx_t_double_complex z;
39746 : z.real = a.real + b.real;
39747 : z.imag = a.imag + b.imag;
39748 : return z;
39749 : }
39750 : static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
39751 : __pyx_t_double_complex z;
39752 : z.real = a.real - b.real;
39753 : z.imag = a.imag - b.imag;
39754 : return z;
39755 : }
39756 : static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
39757 : __pyx_t_double_complex z;
39758 : z.real = a.real * b.real - a.imag * b.imag;
39759 : z.imag = a.real * b.imag + a.imag * b.real;
39760 : return z;
39761 : }
39762 : #if 1
39763 : static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
39764 : if (b.imag == 0) {
39765 : return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
39766 : } else if (fabs(b.real) >= fabs(b.imag)) {
39767 : if (b.real == 0 && b.imag == 0) {
39768 : return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag);
39769 : } else {
39770 : double r = b.imag / b.real;
39771 : double s = (double)(1.0) / (b.real + b.imag * r);
39772 : return __pyx_t_double_complex_from_parts(
39773 : (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
39774 : }
39775 : } else {
39776 : double r = b.real / b.imag;
39777 : double s = (double)(1.0) / (b.imag + b.real * r);
39778 : return __pyx_t_double_complex_from_parts(
39779 : (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
39780 : }
39781 : }
39782 : #else
39783 : static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
39784 : if (b.imag == 0) {
39785 : return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
39786 : } else {
39787 : double denom = b.real * b.real + b.imag * b.imag;
39788 : return __pyx_t_double_complex_from_parts(
39789 : (a.real * b.real + a.imag * b.imag) / denom,
39790 : (a.imag * b.real - a.real * b.imag) / denom);
39791 : }
39792 : }
39793 : #endif
39794 : static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) {
39795 : __pyx_t_double_complex z;
39796 : z.real = -a.real;
39797 : z.imag = -a.imag;
39798 : return z;
39799 : }
39800 : static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex a) {
39801 : return (a.real == 0) && (a.imag == 0);
39802 : }
39803 : static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) {
39804 : __pyx_t_double_complex z;
39805 : z.real = a.real;
39806 : z.imag = -a.imag;
39807 : return z;
39808 : }
39809 : #if 1
39810 : static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex z) {
39811 : #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
39812 : return sqrt(z.real*z.real + z.imag*z.imag);
39813 : #else
39814 : return hypot(z.real, z.imag);
39815 : #endif
39816 : }
39817 : static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
39818 : __pyx_t_double_complex z;
39819 : double r, lnr, theta, z_r, z_theta;
39820 : if (b.imag == 0 && b.real == (int)b.real) {
39821 : if (b.real < 0) {
39822 : double denom = a.real * a.real + a.imag * a.imag;
39823 : a.real = a.real / denom;
39824 : a.imag = -a.imag / denom;
39825 : b.real = -b.real;
39826 : }
39827 : switch ((int)b.real) {
39828 : case 0:
39829 : z.real = 1;
39830 : z.imag = 0;
39831 : return z;
39832 : case 1:
39833 : return a;
39834 : case 2:
39835 : return __Pyx_c_prod_double(a, a);
39836 : case 3:
39837 : z = __Pyx_c_prod_double(a, a);
39838 : return __Pyx_c_prod_double(z, a);
39839 : case 4:
39840 : z = __Pyx_c_prod_double(a, a);
39841 : return __Pyx_c_prod_double(z, z);
39842 : }
39843 : }
39844 : if (a.imag == 0) {
39845 : if (a.real == 0) {
39846 : return a;
39847 : } else if ((b.imag == 0) && (a.real >= 0)) {
39848 : z.real = pow(a.real, b.real);
39849 : z.imag = 0;
39850 : return z;
39851 : } else if (a.real > 0) {
39852 : r = a.real;
39853 : theta = 0;
39854 : } else {
39855 : r = -a.real;
39856 : theta = atan2(0.0, -1.0);
39857 : }
39858 : } else {
39859 : r = __Pyx_c_abs_double(a);
39860 : theta = atan2(a.imag, a.real);
39861 : }
39862 : lnr = log(r);
39863 : z_r = exp(lnr * b.real - theta * b.imag);
39864 : z_theta = theta * b.real + lnr * b.imag;
39865 : z.real = z_r * cos(z_theta);
39866 : z.imag = z_r * sin(z_theta);
39867 : return z;
39868 : }
39869 : #endif
39870 : #endif
39871 :
39872 : /* Declarations */
39873 : #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
39874 : #ifdef __cplusplus
39875 : static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double x, long double y) {
39876 : return ::std::complex< long double >(x, y);
39877 : }
39878 : #else
39879 : static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double x, long double y) {
39880 : return x + y*(__pyx_t_long_double_complex)_Complex_I;
39881 : }
39882 : #endif
39883 : #else
39884 : static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double x, long double y) {
39885 : __pyx_t_long_double_complex z;
39886 : z.real = x;
39887 : z.imag = y;
39888 : return z;
39889 : }
39890 : #endif
39891 :
39892 : /* Arithmetic */
39893 : #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
39894 : #else
39895 : static CYTHON_INLINE int __Pyx_c_eq_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
39896 : return (a.real == b.real) && (a.imag == b.imag);
39897 : }
39898 : static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_sum_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
39899 : __pyx_t_long_double_complex z;
39900 : z.real = a.real + b.real;
39901 : z.imag = a.imag + b.imag;
39902 : return z;
39903 : }
39904 : static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_diff_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
39905 : __pyx_t_long_double_complex z;
39906 : z.real = a.real - b.real;
39907 : z.imag = a.imag - b.imag;
39908 : return z;
39909 : }
39910 : static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_prod_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
39911 : __pyx_t_long_double_complex z;
39912 : z.real = a.real * b.real - a.imag * b.imag;
39913 : z.imag = a.real * b.imag + a.imag * b.real;
39914 : return z;
39915 : }
39916 : #if 1
39917 : static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_quot_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
39918 : if (b.imag == 0) {
39919 : return __pyx_t_long_double_complex_from_parts(a.real / b.real, a.imag / b.real);
39920 : } else if (fabsl(b.real) >= fabsl(b.imag)) {
39921 : if (b.real == 0 && b.imag == 0) {
39922 : return __pyx_t_long_double_complex_from_parts(a.real / b.real, a.imag / b.imag);
39923 : } else {
39924 : long double r = b.imag / b.real;
39925 : long double s = (long double)(1.0) / (b.real + b.imag * r);
39926 : return __pyx_t_long_double_complex_from_parts(
39927 : (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
39928 : }
39929 : } else {
39930 : long double r = b.real / b.imag;
39931 : long double s = (long double)(1.0) / (b.imag + b.real * r);
39932 : return __pyx_t_long_double_complex_from_parts(
39933 : (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
39934 : }
39935 : }
39936 : #else
39937 : static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_quot_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
39938 : if (b.imag == 0) {
39939 : return __pyx_t_long_double_complex_from_parts(a.real / b.real, a.imag / b.real);
39940 : } else {
39941 : long double denom = b.real * b.real + b.imag * b.imag;
39942 : return __pyx_t_long_double_complex_from_parts(
39943 : (a.real * b.real + a.imag * b.imag) / denom,
39944 : (a.imag * b.real - a.real * b.imag) / denom);
39945 : }
39946 : }
39947 : #endif
39948 : static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_neg_long__double(__pyx_t_long_double_complex a) {
39949 : __pyx_t_long_double_complex z;
39950 : z.real = -a.real;
39951 : z.imag = -a.imag;
39952 : return z;
39953 : }
39954 : static CYTHON_INLINE int __Pyx_c_is_zero_long__double(__pyx_t_long_double_complex a) {
39955 : return (a.real == 0) && (a.imag == 0);
39956 : }
39957 : static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_conj_long__double(__pyx_t_long_double_complex a) {
39958 : __pyx_t_long_double_complex z;
39959 : z.real = a.real;
39960 : z.imag = -a.imag;
39961 : return z;
39962 : }
39963 : #if 1
39964 : static CYTHON_INLINE long double __Pyx_c_abs_long__double(__pyx_t_long_double_complex z) {
39965 : #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
39966 : return sqrtl(z.real*z.real + z.imag*z.imag);
39967 : #else
39968 : return hypotl(z.real, z.imag);
39969 : #endif
39970 : }
39971 : static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_pow_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
39972 : __pyx_t_long_double_complex z;
39973 : long double r, lnr, theta, z_r, z_theta;
39974 : if (b.imag == 0 && b.real == (int)b.real) {
39975 : if (b.real < 0) {
39976 : long double denom = a.real * a.real + a.imag * a.imag;
39977 : a.real = a.real / denom;
39978 : a.imag = -a.imag / denom;
39979 : b.real = -b.real;
39980 : }
39981 : switch ((int)b.real) {
39982 : case 0:
39983 : z.real = 1;
39984 : z.imag = 0;
39985 : return z;
39986 : case 1:
39987 : return a;
39988 : case 2:
39989 : return __Pyx_c_prod_long__double(a, a);
39990 : case 3:
39991 : z = __Pyx_c_prod_long__double(a, a);
39992 : return __Pyx_c_prod_long__double(z, a);
39993 : case 4:
39994 : z = __Pyx_c_prod_long__double(a, a);
39995 : return __Pyx_c_prod_long__double(z, z);
39996 : }
39997 : }
39998 : if (a.imag == 0) {
39999 : if (a.real == 0) {
40000 : return a;
40001 : } else if ((b.imag == 0) && (a.real >= 0)) {
40002 : z.real = powl(a.real, b.real);
40003 : z.imag = 0;
40004 : return z;
40005 : } else if (a.real > 0) {
40006 : r = a.real;
40007 : theta = 0;
40008 : } else {
40009 : r = -a.real;
40010 : theta = atan2l(0.0, -1.0);
40011 : }
40012 : } else {
40013 : r = __Pyx_c_abs_long__double(a);
40014 : theta = atan2l(a.imag, a.real);
40015 : }
40016 : lnr = logl(r);
40017 : z_r = expl(lnr * b.real - theta * b.imag);
40018 : z_theta = theta * b.real + lnr * b.imag;
40019 : z.real = z_r * cosl(z_theta);
40020 : z.imag = z_r * sinl(z_theta);
40021 : return z;
40022 : }
40023 : #endif
40024 : #endif
40025 :
40026 : /* MemviewSliceCopyTemplate */
40027 : static __Pyx_memviewslice
40028 0 : __pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs,
40029 : const char *mode, int ndim,
40030 : size_t sizeof_dtype, int contig_flag,
40031 : int dtype_is_object)
40032 : {
40033 : __Pyx_RefNannyDeclarations
40034 0 : int i;
40035 0 : __Pyx_memviewslice new_mvs = { 0, 0, { 0 }, { 0 }, { 0 } };
40036 0 : struct __pyx_memoryview_obj *from_memview = from_mvs->memview;
40037 0 : Py_buffer *buf = &from_memview->view;
40038 0 : PyObject *shape_tuple = NULL;
40039 0 : PyObject *temp_int = NULL;
40040 0 : struct __pyx_array_obj *array_obj = NULL;
40041 0 : struct __pyx_memoryview_obj *memview_obj = NULL;
40042 0 : __Pyx_RefNannySetupContext("__pyx_memoryview_copy_new_contig", 0);
40043 0 : for (i = 0; i < ndim; i++) {
40044 0 : if (unlikely(from_mvs->suboffsets[i] >= 0)) {
40045 0 : PyErr_Format(PyExc_ValueError, "Cannot copy memoryview slice with "
40046 : "indirect dimensions (axis %d)", i);
40047 0 : goto fail;
40048 : }
40049 : }
40050 0 : shape_tuple = PyTuple_New(ndim);
40051 0 : if (unlikely(!shape_tuple)) {
40052 0 : goto fail;
40053 : }
40054 : __Pyx_GOTREF(shape_tuple);
40055 0 : for(i = 0; i < ndim; i++) {
40056 0 : temp_int = PyInt_FromSsize_t(from_mvs->shape[i]);
40057 0 : if(unlikely(!temp_int)) {
40058 0 : goto fail;
40059 : } else {
40060 0 : PyTuple_SET_ITEM(shape_tuple, i, temp_int);
40061 0 : temp_int = NULL;
40062 : }
40063 : }
40064 0 : array_obj = __pyx_array_new(shape_tuple, sizeof_dtype, buf->format, (char *) mode, NULL);
40065 0 : if (unlikely(!array_obj)) {
40066 0 : goto fail;
40067 : }
40068 0 : __Pyx_GOTREF(array_obj);
40069 0 : memview_obj = (struct __pyx_memoryview_obj *) __pyx_memoryview_new(
40070 : (PyObject *) array_obj, contig_flag,
40071 : dtype_is_object,
40072 0 : from_mvs->memview->typeinfo);
40073 0 : if (unlikely(!memview_obj))
40074 0 : goto fail;
40075 0 : if (unlikely(__Pyx_init_memviewslice(memview_obj, ndim, &new_mvs, 1) < 0))
40076 0 : goto fail;
40077 0 : if (unlikely(__pyx_memoryview_copy_contents(*from_mvs, new_mvs, ndim, ndim,
40078 : dtype_is_object) < 0))
40079 0 : goto fail;
40080 0 : goto no_fail;
40081 0 : fail:
40082 0 : __Pyx_XDECREF(new_mvs.memview);
40083 0 : new_mvs.memview = NULL;
40084 0 : new_mvs.data = NULL;
40085 0 : no_fail:
40086 0 : __Pyx_XDECREF(shape_tuple);
40087 0 : __Pyx_XDECREF(temp_int);
40088 0 : __Pyx_XDECREF(array_obj);
40089 0 : __Pyx_RefNannyFinishContext();
40090 0 : return new_mvs;
40091 : }
40092 :
40093 : /* MemviewSliceInit */
40094 : static int
40095 3057 : __Pyx_init_memviewslice(struct __pyx_memoryview_obj *memview,
40096 : int ndim,
40097 : __Pyx_memviewslice *memviewslice,
40098 : int memview_is_new_reference)
40099 : {
40100 : __Pyx_RefNannyDeclarations
40101 3057 : int i, retval=-1;
40102 3057 : Py_buffer *buf = &memview->view;
40103 3057 : __Pyx_RefNannySetupContext("init_memviewslice", 0);
40104 3057 : if (unlikely(memviewslice->memview || memviewslice->data)) {
40105 0 : PyErr_SetString(PyExc_ValueError,
40106 : "memviewslice is already initialized!");
40107 0 : goto fail;
40108 : }
40109 3057 : if (buf->strides) {
40110 8552 : for (i = 0; i < ndim; i++) {
40111 5495 : memviewslice->strides[i] = buf->strides[i];
40112 : }
40113 : } else {
40114 0 : Py_ssize_t stride = buf->itemsize;
40115 0 : for (i = ndim - 1; i >= 0; i--) {
40116 0 : memviewslice->strides[i] = stride;
40117 0 : stride *= buf->shape[i];
40118 : }
40119 : }
40120 8552 : for (i = 0; i < ndim; i++) {
40121 5495 : memviewslice->shape[i] = buf->shape[i];
40122 5495 : if (buf->suboffsets) {
40123 0 : memviewslice->suboffsets[i] = buf->suboffsets[i];
40124 : } else {
40125 5495 : memviewslice->suboffsets[i] = -1;
40126 : }
40127 : }
40128 3057 : memviewslice->memview = memview;
40129 3057 : memviewslice->data = (char *)buf->buf;
40130 3057 : if (__pyx_add_acquisition_count(memview) == 0 && !memview_is_new_reference) {
40131 0 : Py_INCREF(memview);
40132 : }
40133 3057 : retval = 0;
40134 3057 : goto no_fail;
40135 0 : fail:
40136 0 : memviewslice->memview = 0;
40137 0 : memviewslice->data = 0;
40138 0 : retval = -1;
40139 3057 : no_fail:
40140 3057 : __Pyx_RefNannyFinishContext();
40141 3057 : return retval;
40142 : }
40143 : #ifndef Py_NO_RETURN
40144 : #define Py_NO_RETURN
40145 : #endif
40146 0 : static void __pyx_fatalerror(const char *fmt, ...) Py_NO_RETURN {
40147 0 : va_list vargs;
40148 0 : char msg[200];
40149 : #if PY_VERSION_HEX >= 0x030A0000 || defined(HAVE_STDARG_PROTOTYPES)
40150 0 : va_start(vargs, fmt);
40151 : #else
40152 : va_start(vargs);
40153 : #endif
40154 0 : vsnprintf(msg, 200, fmt, vargs);
40155 0 : va_end(vargs);
40156 0 : Py_FatalError(msg);
40157 : }
40158 : static CYTHON_INLINE int
40159 : __pyx_add_acquisition_count_locked(__pyx_atomic_int_type *acquisition_count,
40160 : PyThread_type_lock lock)
40161 : {
40162 : int result;
40163 : PyThread_acquire_lock(lock, 1);
40164 : result = (*acquisition_count)++;
40165 : PyThread_release_lock(lock);
40166 : return result;
40167 : }
40168 : static CYTHON_INLINE int
40169 : __pyx_sub_acquisition_count_locked(__pyx_atomic_int_type *acquisition_count,
40170 : PyThread_type_lock lock)
40171 : {
40172 : int result;
40173 : PyThread_acquire_lock(lock, 1);
40174 : result = (*acquisition_count)--;
40175 : PyThread_release_lock(lock);
40176 : return result;
40177 : }
40178 : static CYTHON_INLINE void
40179 781788 : __Pyx_INC_MEMVIEW(__Pyx_memviewslice *memslice, int have_gil, int lineno)
40180 : {
40181 781788 : __pyx_nonatomic_int_type old_acquisition_count;
40182 781788 : struct __pyx_memoryview_obj *memview = memslice->memview;
40183 781788 : if (unlikely(!memview || (PyObject *) memview == Py_None)) {
40184 : return;
40185 : }
40186 781788 : old_acquisition_count = __pyx_add_acquisition_count(memview);
40187 781788 : if (unlikely(old_acquisition_count <= 0)) {
40188 0 : if (likely(old_acquisition_count == 0)) {
40189 0 : if (have_gil) {
40190 0 : Py_INCREF((PyObject *) memview);
40191 : } else {
40192 0 : PyGILState_STATE _gilstate = PyGILState_Ensure();
40193 0 : Py_INCREF((PyObject *) memview);
40194 0 : PyGILState_Release(_gilstate);
40195 : }
40196 : } else {
40197 0 : __pyx_fatalerror("Acquisition count is %d (line %d)",
40198 : old_acquisition_count+1, lineno);
40199 : }
40200 : }
40201 : }
40202 784845 : static CYTHON_INLINE void __Pyx_XCLEAR_MEMVIEW(__Pyx_memviewslice *memslice,
40203 : int have_gil, int lineno) {
40204 784845 : __pyx_nonatomic_int_type old_acquisition_count;
40205 784845 : struct __pyx_memoryview_obj *memview = memslice->memview;
40206 784845 : if (unlikely(!memview || (PyObject *) memview == Py_None)) {
40207 0 : memslice->memview = NULL;
40208 0 : return;
40209 : }
40210 784845 : old_acquisition_count = __pyx_sub_acquisition_count(memview);
40211 784845 : memslice->data = NULL;
40212 784845 : if (likely(old_acquisition_count > 1)) {
40213 781788 : memslice->memview = NULL;
40214 3057 : } else if (likely(old_acquisition_count == 1)) {
40215 3057 : if (have_gil) {
40216 3057 : Py_CLEAR(memslice->memview);
40217 : } else {
40218 0 : PyGILState_STATE _gilstate = PyGILState_Ensure();
40219 0 : Py_CLEAR(memslice->memview);
40220 0 : PyGILState_Release(_gilstate);
40221 : }
40222 : } else {
40223 0 : __pyx_fatalerror("Acquisition count is %d (line %d)",
40224 : old_acquisition_count-1, lineno);
40225 : }
40226 : }
40227 :
40228 : /* CIntToPy */
40229 3068 : static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
40230 : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
40231 : #pragma GCC diagnostic push
40232 : #pragma GCC diagnostic ignored "-Wconversion"
40233 : #endif
40234 3068 : const int neg_one = (int) -1, const_zero = (int) 0;
40235 : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
40236 : #pragma GCC diagnostic pop
40237 : #endif
40238 3068 : const int is_unsigned = neg_one > const_zero;
40239 3068 : if (is_unsigned) {
40240 : if (sizeof(int) < sizeof(long)) {
40241 : return PyInt_FromLong((long) value);
40242 : } else if (sizeof(int) <= sizeof(unsigned long)) {
40243 : return PyLong_FromUnsignedLong((unsigned long) value);
40244 : #ifdef HAVE_LONG_LONG
40245 : } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
40246 : return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
40247 : #endif
40248 : }
40249 : } else {
40250 3068 : if (sizeof(int) <= sizeof(long)) {
40251 3068 : return PyInt_FromLong((long) value);
40252 : #ifdef HAVE_LONG_LONG
40253 : } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
40254 : return PyLong_FromLongLong((PY_LONG_LONG) value);
40255 : #endif
40256 : }
40257 : }
40258 : {
40259 : unsigned char *bytes = (unsigned char *)&value;
40260 : #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
40261 : if (is_unsigned) {
40262 : return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
40263 : } else {
40264 : return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
40265 : }
40266 : #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
40267 : int one = 1; int little = (int)*(unsigned char *)&one;
40268 : return _PyLong_FromByteArray(bytes, sizeof(int),
40269 : little, !is_unsigned);
40270 : #else
40271 : int one = 1; int little = (int)*(unsigned char *)&one;
40272 : PyObject *from_bytes, *result = NULL;
40273 : PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
40274 : from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
40275 : if (!from_bytes) return NULL;
40276 : py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int));
40277 : if (!py_bytes) goto limited_bad;
40278 : order_str = PyUnicode_FromString(little ? "little" : "big");
40279 : if (!order_str) goto limited_bad;
40280 : arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
40281 : if (!arg_tuple) goto limited_bad;
40282 : if (!is_unsigned) {
40283 : kwds = PyDict_New();
40284 : if (!kwds) goto limited_bad;
40285 : if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
40286 : }
40287 : result = PyObject_Call(from_bytes, arg_tuple, kwds);
40288 : limited_bad:
40289 : Py_XDECREF(kwds);
40290 : Py_XDECREF(arg_tuple);
40291 : Py_XDECREF(order_str);
40292 : Py_XDECREF(py_bytes);
40293 : Py_XDECREF(from_bytes);
40294 : return result;
40295 : #endif
40296 : }
40297 : }
40298 :
40299 : /* CIntFromPy */
40300 4805 : static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
40301 : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
40302 : #pragma GCC diagnostic push
40303 : #pragma GCC diagnostic ignored "-Wconversion"
40304 : #endif
40305 4805 : const int neg_one = (int) -1, const_zero = (int) 0;
40306 : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
40307 : #pragma GCC diagnostic pop
40308 : #endif
40309 4805 : const int is_unsigned = neg_one > const_zero;
40310 : #if PY_MAJOR_VERSION < 3
40311 : if (likely(PyInt_Check(x))) {
40312 : if ((sizeof(int) < sizeof(long))) {
40313 : __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
40314 : } else {
40315 : long val = PyInt_AS_LONG(x);
40316 : if (is_unsigned && unlikely(val < 0)) {
40317 : goto raise_neg_overflow;
40318 : }
40319 : return (int) val;
40320 : }
40321 : }
40322 : #endif
40323 4805 : if (unlikely(!PyLong_Check(x))) {
40324 0 : int val;
40325 0 : PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
40326 0 : if (!tmp) return (int) -1;
40327 0 : val = __Pyx_PyInt_As_int(tmp);
40328 0 : Py_DECREF(tmp);
40329 0 : return val;
40330 : }
40331 4805 : if (is_unsigned) {
40332 : #if CYTHON_USE_PYLONG_INTERNALS
40333 : if (unlikely(__Pyx_PyLong_IsNeg(x))) {
40334 : goto raise_neg_overflow;
40335 : } else if (__Pyx_PyLong_IsCompact(x)) {
40336 : __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
40337 : } else {
40338 : const digit* digits = __Pyx_PyLong_Digits(x);
40339 : assert(__Pyx_PyLong_DigitCount(x) > 1);
40340 : switch (__Pyx_PyLong_DigitCount(x)) {
40341 : case 2:
40342 : if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) {
40343 : if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
40344 : __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40345 : } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) {
40346 : return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
40347 : }
40348 : }
40349 : break;
40350 : case 3:
40351 : if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) {
40352 : if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
40353 : __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40354 : } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) {
40355 : return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
40356 : }
40357 : }
40358 : break;
40359 : case 4:
40360 : if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) {
40361 : if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
40362 : __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40363 : } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) {
40364 : return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
40365 : }
40366 : }
40367 : break;
40368 : }
40369 : }
40370 : #endif
40371 : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
40372 : if (unlikely(Py_SIZE(x) < 0)) {
40373 : goto raise_neg_overflow;
40374 : }
40375 : #else
40376 : {
40377 : int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
40378 : if (unlikely(result < 0))
40379 : return (int) -1;
40380 : if (unlikely(result == 1))
40381 : goto raise_neg_overflow;
40382 : }
40383 : #endif
40384 : if ((sizeof(int) <= sizeof(unsigned long))) {
40385 : __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
40386 : #ifdef HAVE_LONG_LONG
40387 : } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) {
40388 : __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
40389 : #endif
40390 : }
40391 : } else {
40392 : #if CYTHON_USE_PYLONG_INTERNALS
40393 4805 : if (__Pyx_PyLong_IsCompact(x)) {
40394 4805 : __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
40395 : } else {
40396 0 : const digit* digits = __Pyx_PyLong_Digits(x);
40397 0 : assert(__Pyx_PyLong_DigitCount(x) > 1);
40398 0 : switch (__Pyx_PyLong_SignedDigitCount(x)) {
40399 : case -2:
40400 0 : if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) {
40401 0 : if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
40402 0 : __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40403 : } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
40404 : return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
40405 : }
40406 : }
40407 : break;
40408 : case 2:
40409 0 : if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) {
40410 0 : if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
40411 0 : __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40412 : } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
40413 : return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
40414 : }
40415 : }
40416 : break;
40417 : case -3:
40418 : if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
40419 : if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
40420 : __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40421 : } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
40422 : return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
40423 : }
40424 : }
40425 : break;
40426 : case 3:
40427 : if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) {
40428 : if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
40429 : __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40430 : } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
40431 : return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
40432 : }
40433 : }
40434 : break;
40435 : case -4:
40436 : if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
40437 : if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
40438 : __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40439 : } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
40440 : return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
40441 : }
40442 : }
40443 : break;
40444 : case 4:
40445 : if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) {
40446 : if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
40447 : __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40448 : } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
40449 : return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
40450 : }
40451 : }
40452 : break;
40453 : }
40454 : }
40455 : #endif
40456 0 : if ((sizeof(int) <= sizeof(long))) {
40457 0 : __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
40458 : #ifdef HAVE_LONG_LONG
40459 : } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) {
40460 : __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
40461 : #endif
40462 : }
40463 : }
40464 : {
40465 : int val;
40466 : int ret = -1;
40467 : #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
40468 : Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
40469 : x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
40470 : if (unlikely(bytes_copied == -1)) {
40471 : } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
40472 : goto raise_overflow;
40473 : } else {
40474 : ret = 0;
40475 : }
40476 : #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
40477 : int one = 1; int is_little = (int)*(unsigned char *)&one;
40478 : unsigned char *bytes = (unsigned char *)&val;
40479 : ret = _PyLong_AsByteArray((PyLongObject *)x,
40480 : bytes, sizeof(val),
40481 : is_little, !is_unsigned);
40482 : #else
40483 : PyObject *v;
40484 : PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
40485 : int bits, remaining_bits, is_negative = 0;
40486 : int chunk_size = (sizeof(long) < 8) ? 30 : 62;
40487 : if (likely(PyLong_CheckExact(x))) {
40488 : v = __Pyx_NewRef(x);
40489 : } else {
40490 : v = PyNumber_Long(x);
40491 : if (unlikely(!v)) return (int) -1;
40492 : assert(PyLong_CheckExact(v));
40493 : }
40494 : {
40495 : int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
40496 : if (unlikely(result < 0)) {
40497 : Py_DECREF(v);
40498 : return (int) -1;
40499 : }
40500 : is_negative = result == 1;
40501 : }
40502 : if (is_unsigned && unlikely(is_negative)) {
40503 : Py_DECREF(v);
40504 : goto raise_neg_overflow;
40505 : } else if (is_negative) {
40506 : stepval = PyNumber_Invert(v);
40507 : Py_DECREF(v);
40508 : if (unlikely(!stepval))
40509 : return (int) -1;
40510 : } else {
40511 : stepval = v;
40512 : }
40513 : v = NULL;
40514 : val = (int) 0;
40515 : mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
40516 : shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
40517 : for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) {
40518 : PyObject *tmp, *digit;
40519 : long idigit;
40520 : digit = PyNumber_And(stepval, mask);
40521 : if (unlikely(!digit)) goto done;
40522 : idigit = PyLong_AsLong(digit);
40523 : Py_DECREF(digit);
40524 : if (unlikely(idigit < 0)) goto done;
40525 : val |= ((int) idigit) << bits;
40526 : tmp = PyNumber_Rshift(stepval, shift);
40527 : if (unlikely(!tmp)) goto done;
40528 : Py_DECREF(stepval); stepval = tmp;
40529 : }
40530 : Py_DECREF(shift); shift = NULL;
40531 : Py_DECREF(mask); mask = NULL;
40532 : {
40533 : long idigit = PyLong_AsLong(stepval);
40534 : if (unlikely(idigit < 0)) goto done;
40535 : remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1);
40536 : if (unlikely(idigit >= (1L << remaining_bits)))
40537 : goto raise_overflow;
40538 : val |= ((int) idigit) << bits;
40539 : }
40540 : if (!is_unsigned) {
40541 : if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1))))
40542 : goto raise_overflow;
40543 : if (is_negative)
40544 : val = ~val;
40545 : }
40546 : ret = 0;
40547 : done:
40548 : Py_XDECREF(shift);
40549 : Py_XDECREF(mask);
40550 : Py_XDECREF(stepval);
40551 : #endif
40552 : if (unlikely(ret))
40553 : return (int) -1;
40554 : return val;
40555 : }
40556 0 : raise_overflow:
40557 0 : PyErr_SetString(PyExc_OverflowError,
40558 : "value too large to convert to int");
40559 0 : return (int) -1;
40560 : raise_neg_overflow:
40561 : PyErr_SetString(PyExc_OverflowError,
40562 : "can't convert negative value to int");
40563 : return (int) -1;
40564 : }
40565 :
40566 : /* CIntFromPy */
40567 1152 : static CYTHON_INLINE npy_uint32 __Pyx_PyInt_As_npy_uint32(PyObject *x) {
40568 : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
40569 : #pragma GCC diagnostic push
40570 : #pragma GCC diagnostic ignored "-Wconversion"
40571 : #endif
40572 1152 : const npy_uint32 neg_one = (npy_uint32) -1, const_zero = (npy_uint32) 0;
40573 : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
40574 : #pragma GCC diagnostic pop
40575 : #endif
40576 1152 : const int is_unsigned = neg_one > const_zero;
40577 : #if PY_MAJOR_VERSION < 3
40578 : if (likely(PyInt_Check(x))) {
40579 : if ((sizeof(npy_uint32) < sizeof(long))) {
40580 : __PYX_VERIFY_RETURN_INT(npy_uint32, long, PyInt_AS_LONG(x))
40581 : } else {
40582 : long val = PyInt_AS_LONG(x);
40583 : if (is_unsigned && unlikely(val < 0)) {
40584 : goto raise_neg_overflow;
40585 : }
40586 : return (npy_uint32) val;
40587 : }
40588 : }
40589 : #endif
40590 1152 : if (unlikely(!PyLong_Check(x))) {
40591 258 : npy_uint32 val;
40592 258 : PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
40593 258 : if (!tmp) return (npy_uint32) -1;
40594 258 : val = __Pyx_PyInt_As_npy_uint32(tmp);
40595 258 : Py_DECREF(tmp);
40596 258 : return val;
40597 : }
40598 894 : if (is_unsigned) {
40599 : #if CYTHON_USE_PYLONG_INTERNALS
40600 894 : if (unlikely(__Pyx_PyLong_IsNeg(x))) {
40601 0 : goto raise_neg_overflow;
40602 894 : } else if (__Pyx_PyLong_IsCompact(x)) {
40603 894 : __PYX_VERIFY_RETURN_INT(npy_uint32, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
40604 : } else {
40605 0 : const digit* digits = __Pyx_PyLong_Digits(x);
40606 0 : assert(__Pyx_PyLong_DigitCount(x) > 1);
40607 0 : switch (__Pyx_PyLong_DigitCount(x)) {
40608 : case 2:
40609 0 : if ((8 * sizeof(npy_uint32) > 1 * PyLong_SHIFT)) {
40610 0 : if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
40611 0 : __PYX_VERIFY_RETURN_INT(npy_uint32, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40612 : } else if ((8 * sizeof(npy_uint32) >= 2 * PyLong_SHIFT)) {
40613 : return (npy_uint32) (((((npy_uint32)digits[1]) << PyLong_SHIFT) | (npy_uint32)digits[0]));
40614 : }
40615 : }
40616 : break;
40617 : case 3:
40618 : if ((8 * sizeof(npy_uint32) > 2 * PyLong_SHIFT)) {
40619 : if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
40620 : __PYX_VERIFY_RETURN_INT(npy_uint32, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40621 : } else if ((8 * sizeof(npy_uint32) >= 3 * PyLong_SHIFT)) {
40622 : return (npy_uint32) (((((((npy_uint32)digits[2]) << PyLong_SHIFT) | (npy_uint32)digits[1]) << PyLong_SHIFT) | (npy_uint32)digits[0]));
40623 : }
40624 : }
40625 : break;
40626 : case 4:
40627 : if ((8 * sizeof(npy_uint32) > 3 * PyLong_SHIFT)) {
40628 : if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
40629 : __PYX_VERIFY_RETURN_INT(npy_uint32, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40630 : } else if ((8 * sizeof(npy_uint32) >= 4 * PyLong_SHIFT)) {
40631 : return (npy_uint32) (((((((((npy_uint32)digits[3]) << PyLong_SHIFT) | (npy_uint32)digits[2]) << PyLong_SHIFT) | (npy_uint32)digits[1]) << PyLong_SHIFT) | (npy_uint32)digits[0]));
40632 : }
40633 : }
40634 : break;
40635 : }
40636 : }
40637 : #endif
40638 : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
40639 : if (unlikely(Py_SIZE(x) < 0)) {
40640 : goto raise_neg_overflow;
40641 : }
40642 : #else
40643 : {
40644 0 : int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
40645 0 : if (unlikely(result < 0))
40646 : return (npy_uint32) -1;
40647 0 : if (unlikely(result == 1))
40648 0 : goto raise_neg_overflow;
40649 : }
40650 : #endif
40651 0 : if ((sizeof(npy_uint32) <= sizeof(unsigned long))) {
40652 0 : __PYX_VERIFY_RETURN_INT_EXC(npy_uint32, unsigned long, PyLong_AsUnsignedLong(x))
40653 : #ifdef HAVE_LONG_LONG
40654 : } else if ((sizeof(npy_uint32) <= sizeof(unsigned PY_LONG_LONG))) {
40655 : __PYX_VERIFY_RETURN_INT_EXC(npy_uint32, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
40656 : #endif
40657 : }
40658 : } else {
40659 : #if CYTHON_USE_PYLONG_INTERNALS
40660 : if (__Pyx_PyLong_IsCompact(x)) {
40661 : __PYX_VERIFY_RETURN_INT(npy_uint32, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
40662 : } else {
40663 : const digit* digits = __Pyx_PyLong_Digits(x);
40664 : assert(__Pyx_PyLong_DigitCount(x) > 1);
40665 : switch (__Pyx_PyLong_SignedDigitCount(x)) {
40666 : case -2:
40667 : if ((8 * sizeof(npy_uint32) - 1 > 1 * PyLong_SHIFT)) {
40668 : if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
40669 : __PYX_VERIFY_RETURN_INT(npy_uint32, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40670 : } else if ((8 * sizeof(npy_uint32) - 1 > 2 * PyLong_SHIFT)) {
40671 : return (npy_uint32) (((npy_uint32)-1)*(((((npy_uint32)digits[1]) << PyLong_SHIFT) | (npy_uint32)digits[0])));
40672 : }
40673 : }
40674 : break;
40675 : case 2:
40676 : if ((8 * sizeof(npy_uint32) > 1 * PyLong_SHIFT)) {
40677 : if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
40678 : __PYX_VERIFY_RETURN_INT(npy_uint32, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40679 : } else if ((8 * sizeof(npy_uint32) - 1 > 2 * PyLong_SHIFT)) {
40680 : return (npy_uint32) ((((((npy_uint32)digits[1]) << PyLong_SHIFT) | (npy_uint32)digits[0])));
40681 : }
40682 : }
40683 : break;
40684 : case -3:
40685 : if ((8 * sizeof(npy_uint32) - 1 > 2 * PyLong_SHIFT)) {
40686 : if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
40687 : __PYX_VERIFY_RETURN_INT(npy_uint32, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40688 : } else if ((8 * sizeof(npy_uint32) - 1 > 3 * PyLong_SHIFT)) {
40689 : return (npy_uint32) (((npy_uint32)-1)*(((((((npy_uint32)digits[2]) << PyLong_SHIFT) | (npy_uint32)digits[1]) << PyLong_SHIFT) | (npy_uint32)digits[0])));
40690 : }
40691 : }
40692 : break;
40693 : case 3:
40694 : if ((8 * sizeof(npy_uint32) > 2 * PyLong_SHIFT)) {
40695 : if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
40696 : __PYX_VERIFY_RETURN_INT(npy_uint32, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40697 : } else if ((8 * sizeof(npy_uint32) - 1 > 3 * PyLong_SHIFT)) {
40698 : return (npy_uint32) ((((((((npy_uint32)digits[2]) << PyLong_SHIFT) | (npy_uint32)digits[1]) << PyLong_SHIFT) | (npy_uint32)digits[0])));
40699 : }
40700 : }
40701 : break;
40702 : case -4:
40703 : if ((8 * sizeof(npy_uint32) - 1 > 3 * PyLong_SHIFT)) {
40704 : if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
40705 : __PYX_VERIFY_RETURN_INT(npy_uint32, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40706 : } else if ((8 * sizeof(npy_uint32) - 1 > 4 * PyLong_SHIFT)) {
40707 : return (npy_uint32) (((npy_uint32)-1)*(((((((((npy_uint32)digits[3]) << PyLong_SHIFT) | (npy_uint32)digits[2]) << PyLong_SHIFT) | (npy_uint32)digits[1]) << PyLong_SHIFT) | (npy_uint32)digits[0])));
40708 : }
40709 : }
40710 : break;
40711 : case 4:
40712 : if ((8 * sizeof(npy_uint32) > 3 * PyLong_SHIFT)) {
40713 : if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
40714 : __PYX_VERIFY_RETURN_INT(npy_uint32, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40715 : } else if ((8 * sizeof(npy_uint32) - 1 > 4 * PyLong_SHIFT)) {
40716 : return (npy_uint32) ((((((((((npy_uint32)digits[3]) << PyLong_SHIFT) | (npy_uint32)digits[2]) << PyLong_SHIFT) | (npy_uint32)digits[1]) << PyLong_SHIFT) | (npy_uint32)digits[0])));
40717 : }
40718 : }
40719 : break;
40720 : }
40721 : }
40722 : #endif
40723 : if ((sizeof(npy_uint32) <= sizeof(long))) {
40724 : __PYX_VERIFY_RETURN_INT_EXC(npy_uint32, long, PyLong_AsLong(x))
40725 : #ifdef HAVE_LONG_LONG
40726 : } else if ((sizeof(npy_uint32) <= sizeof(PY_LONG_LONG))) {
40727 : __PYX_VERIFY_RETURN_INT_EXC(npy_uint32, PY_LONG_LONG, PyLong_AsLongLong(x))
40728 : #endif
40729 : }
40730 : }
40731 : {
40732 : npy_uint32 val;
40733 : int ret = -1;
40734 : #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
40735 : Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
40736 : x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
40737 : if (unlikely(bytes_copied == -1)) {
40738 : } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
40739 : goto raise_overflow;
40740 : } else {
40741 : ret = 0;
40742 : }
40743 : #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
40744 : int one = 1; int is_little = (int)*(unsigned char *)&one;
40745 : unsigned char *bytes = (unsigned char *)&val;
40746 : ret = _PyLong_AsByteArray((PyLongObject *)x,
40747 : bytes, sizeof(val),
40748 : is_little, !is_unsigned);
40749 : #else
40750 : PyObject *v;
40751 : PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
40752 : int bits, remaining_bits, is_negative = 0;
40753 : int chunk_size = (sizeof(long) < 8) ? 30 : 62;
40754 : if (likely(PyLong_CheckExact(x))) {
40755 : v = __Pyx_NewRef(x);
40756 : } else {
40757 : v = PyNumber_Long(x);
40758 : if (unlikely(!v)) return (npy_uint32) -1;
40759 : assert(PyLong_CheckExact(v));
40760 : }
40761 : {
40762 : int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
40763 : if (unlikely(result < 0)) {
40764 : Py_DECREF(v);
40765 : return (npy_uint32) -1;
40766 : }
40767 : is_negative = result == 1;
40768 : }
40769 : if (is_unsigned && unlikely(is_negative)) {
40770 : Py_DECREF(v);
40771 : goto raise_neg_overflow;
40772 : } else if (is_negative) {
40773 : stepval = PyNumber_Invert(v);
40774 : Py_DECREF(v);
40775 : if (unlikely(!stepval))
40776 : return (npy_uint32) -1;
40777 : } else {
40778 : stepval = v;
40779 : }
40780 : v = NULL;
40781 : val = (npy_uint32) 0;
40782 : mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
40783 : shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
40784 : for (bits = 0; bits < (int) sizeof(npy_uint32) * 8 - chunk_size; bits += chunk_size) {
40785 : PyObject *tmp, *digit;
40786 : long idigit;
40787 : digit = PyNumber_And(stepval, mask);
40788 : if (unlikely(!digit)) goto done;
40789 : idigit = PyLong_AsLong(digit);
40790 : Py_DECREF(digit);
40791 : if (unlikely(idigit < 0)) goto done;
40792 : val |= ((npy_uint32) idigit) << bits;
40793 : tmp = PyNumber_Rshift(stepval, shift);
40794 : if (unlikely(!tmp)) goto done;
40795 : Py_DECREF(stepval); stepval = tmp;
40796 : }
40797 : Py_DECREF(shift); shift = NULL;
40798 : Py_DECREF(mask); mask = NULL;
40799 : {
40800 : long idigit = PyLong_AsLong(stepval);
40801 : if (unlikely(idigit < 0)) goto done;
40802 : remaining_bits = ((int) sizeof(npy_uint32) * 8) - bits - (is_unsigned ? 0 : 1);
40803 : if (unlikely(idigit >= (1L << remaining_bits)))
40804 : goto raise_overflow;
40805 : val |= ((npy_uint32) idigit) << bits;
40806 : }
40807 : if (!is_unsigned) {
40808 : if (unlikely(val & (((npy_uint32) 1) << (sizeof(npy_uint32) * 8 - 1))))
40809 : goto raise_overflow;
40810 : if (is_negative)
40811 : val = ~val;
40812 : }
40813 : ret = 0;
40814 : done:
40815 : Py_XDECREF(shift);
40816 : Py_XDECREF(mask);
40817 : Py_XDECREF(stepval);
40818 : #endif
40819 : if (unlikely(ret))
40820 : return (npy_uint32) -1;
40821 : return val;
40822 : }
40823 0 : raise_overflow:
40824 0 : PyErr_SetString(PyExc_OverflowError,
40825 : "value too large to convert to npy_uint32");
40826 0 : return (npy_uint32) -1;
40827 0 : raise_neg_overflow:
40828 0 : PyErr_SetString(PyExc_OverflowError,
40829 : "can't convert negative value to npy_uint32");
40830 0 : return (npy_uint32) -1;
40831 : }
40832 :
40833 : /* CIntFromPy */
40834 16 : static CYTHON_INLINE npy_uint64 __Pyx_PyInt_As_npy_uint64(PyObject *x) {
40835 : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
40836 : #pragma GCC diagnostic push
40837 : #pragma GCC diagnostic ignored "-Wconversion"
40838 : #endif
40839 16 : const npy_uint64 neg_one = (npy_uint64) -1, const_zero = (npy_uint64) 0;
40840 : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
40841 : #pragma GCC diagnostic pop
40842 : #endif
40843 16 : const int is_unsigned = neg_one > const_zero;
40844 : #if PY_MAJOR_VERSION < 3
40845 : if (likely(PyInt_Check(x))) {
40846 : if ((sizeof(npy_uint64) < sizeof(long))) {
40847 : __PYX_VERIFY_RETURN_INT(npy_uint64, long, PyInt_AS_LONG(x))
40848 : } else {
40849 : long val = PyInt_AS_LONG(x);
40850 : if (is_unsigned && unlikely(val < 0)) {
40851 : goto raise_neg_overflow;
40852 : }
40853 : return (npy_uint64) val;
40854 : }
40855 : }
40856 : #endif
40857 16 : if (unlikely(!PyLong_Check(x))) {
40858 0 : npy_uint64 val;
40859 0 : PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
40860 0 : if (!tmp) return (npy_uint64) -1;
40861 0 : val = __Pyx_PyInt_As_npy_uint64(tmp);
40862 0 : Py_DECREF(tmp);
40863 0 : return val;
40864 : }
40865 16 : if (is_unsigned) {
40866 : #if CYTHON_USE_PYLONG_INTERNALS
40867 16 : if (unlikely(__Pyx_PyLong_IsNeg(x))) {
40868 0 : goto raise_neg_overflow;
40869 16 : } else if (__Pyx_PyLong_IsCompact(x)) {
40870 16 : __PYX_VERIFY_RETURN_INT(npy_uint64, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
40871 : } else {
40872 0 : const digit* digits = __Pyx_PyLong_Digits(x);
40873 0 : assert(__Pyx_PyLong_DigitCount(x) > 1);
40874 0 : switch (__Pyx_PyLong_DigitCount(x)) {
40875 : case 2:
40876 0 : if ((8 * sizeof(npy_uint64) > 1 * PyLong_SHIFT)) {
40877 0 : if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
40878 0 : __PYX_VERIFY_RETURN_INT(npy_uint64, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40879 : } else if ((8 * sizeof(npy_uint64) >= 2 * PyLong_SHIFT)) {
40880 : return (npy_uint64) (((((npy_uint64)digits[1]) << PyLong_SHIFT) | (npy_uint64)digits[0]));
40881 : }
40882 : }
40883 : break;
40884 : case 3:
40885 : if ((8 * sizeof(npy_uint64) > 2 * PyLong_SHIFT)) {
40886 : if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
40887 : __PYX_VERIFY_RETURN_INT(npy_uint64, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40888 : } else if ((8 * sizeof(npy_uint64) >= 3 * PyLong_SHIFT)) {
40889 : return (npy_uint64) (((((((npy_uint64)digits[2]) << PyLong_SHIFT) | (npy_uint64)digits[1]) << PyLong_SHIFT) | (npy_uint64)digits[0]));
40890 : }
40891 : }
40892 : break;
40893 : case 4:
40894 : if ((8 * sizeof(npy_uint64) > 3 * PyLong_SHIFT)) {
40895 : if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
40896 : __PYX_VERIFY_RETURN_INT(npy_uint64, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40897 : } else if ((8 * sizeof(npy_uint64) >= 4 * PyLong_SHIFT)) {
40898 : return (npy_uint64) (((((((((npy_uint64)digits[3]) << PyLong_SHIFT) | (npy_uint64)digits[2]) << PyLong_SHIFT) | (npy_uint64)digits[1]) << PyLong_SHIFT) | (npy_uint64)digits[0]));
40899 : }
40900 : }
40901 : break;
40902 : }
40903 : }
40904 : #endif
40905 : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
40906 : if (unlikely(Py_SIZE(x) < 0)) {
40907 : goto raise_neg_overflow;
40908 : }
40909 : #else
40910 : {
40911 0 : int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
40912 0 : if (unlikely(result < 0))
40913 : return (npy_uint64) -1;
40914 0 : if (unlikely(result == 1))
40915 0 : goto raise_neg_overflow;
40916 : }
40917 : #endif
40918 0 : if ((sizeof(npy_uint64) <= sizeof(unsigned long))) {
40919 0 : __PYX_VERIFY_RETURN_INT_EXC(npy_uint64, unsigned long, PyLong_AsUnsignedLong(x))
40920 : #ifdef HAVE_LONG_LONG
40921 : } else if ((sizeof(npy_uint64) <= sizeof(unsigned PY_LONG_LONG))) {
40922 : __PYX_VERIFY_RETURN_INT_EXC(npy_uint64, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
40923 : #endif
40924 : }
40925 : } else {
40926 : #if CYTHON_USE_PYLONG_INTERNALS
40927 : if (__Pyx_PyLong_IsCompact(x)) {
40928 : __PYX_VERIFY_RETURN_INT(npy_uint64, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
40929 : } else {
40930 : const digit* digits = __Pyx_PyLong_Digits(x);
40931 : assert(__Pyx_PyLong_DigitCount(x) > 1);
40932 : switch (__Pyx_PyLong_SignedDigitCount(x)) {
40933 : case -2:
40934 : if ((8 * sizeof(npy_uint64) - 1 > 1 * PyLong_SHIFT)) {
40935 : if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
40936 : __PYX_VERIFY_RETURN_INT(npy_uint64, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40937 : } else if ((8 * sizeof(npy_uint64) - 1 > 2 * PyLong_SHIFT)) {
40938 : return (npy_uint64) (((npy_uint64)-1)*(((((npy_uint64)digits[1]) << PyLong_SHIFT) | (npy_uint64)digits[0])));
40939 : }
40940 : }
40941 : break;
40942 : case 2:
40943 : if ((8 * sizeof(npy_uint64) > 1 * PyLong_SHIFT)) {
40944 : if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
40945 : __PYX_VERIFY_RETURN_INT(npy_uint64, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40946 : } else if ((8 * sizeof(npy_uint64) - 1 > 2 * PyLong_SHIFT)) {
40947 : return (npy_uint64) ((((((npy_uint64)digits[1]) << PyLong_SHIFT) | (npy_uint64)digits[0])));
40948 : }
40949 : }
40950 : break;
40951 : case -3:
40952 : if ((8 * sizeof(npy_uint64) - 1 > 2 * PyLong_SHIFT)) {
40953 : if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
40954 : __PYX_VERIFY_RETURN_INT(npy_uint64, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40955 : } else if ((8 * sizeof(npy_uint64) - 1 > 3 * PyLong_SHIFT)) {
40956 : return (npy_uint64) (((npy_uint64)-1)*(((((((npy_uint64)digits[2]) << PyLong_SHIFT) | (npy_uint64)digits[1]) << PyLong_SHIFT) | (npy_uint64)digits[0])));
40957 : }
40958 : }
40959 : break;
40960 : case 3:
40961 : if ((8 * sizeof(npy_uint64) > 2 * PyLong_SHIFT)) {
40962 : if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
40963 : __PYX_VERIFY_RETURN_INT(npy_uint64, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40964 : } else if ((8 * sizeof(npy_uint64) - 1 > 3 * PyLong_SHIFT)) {
40965 : return (npy_uint64) ((((((((npy_uint64)digits[2]) << PyLong_SHIFT) | (npy_uint64)digits[1]) << PyLong_SHIFT) | (npy_uint64)digits[0])));
40966 : }
40967 : }
40968 : break;
40969 : case -4:
40970 : if ((8 * sizeof(npy_uint64) - 1 > 3 * PyLong_SHIFT)) {
40971 : if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
40972 : __PYX_VERIFY_RETURN_INT(npy_uint64, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40973 : } else if ((8 * sizeof(npy_uint64) - 1 > 4 * PyLong_SHIFT)) {
40974 : return (npy_uint64) (((npy_uint64)-1)*(((((((((npy_uint64)digits[3]) << PyLong_SHIFT) | (npy_uint64)digits[2]) << PyLong_SHIFT) | (npy_uint64)digits[1]) << PyLong_SHIFT) | (npy_uint64)digits[0])));
40975 : }
40976 : }
40977 : break;
40978 : case 4:
40979 : if ((8 * sizeof(npy_uint64) > 3 * PyLong_SHIFT)) {
40980 : if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
40981 : __PYX_VERIFY_RETURN_INT(npy_uint64, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40982 : } else if ((8 * sizeof(npy_uint64) - 1 > 4 * PyLong_SHIFT)) {
40983 : return (npy_uint64) ((((((((((npy_uint64)digits[3]) << PyLong_SHIFT) | (npy_uint64)digits[2]) << PyLong_SHIFT) | (npy_uint64)digits[1]) << PyLong_SHIFT) | (npy_uint64)digits[0])));
40984 : }
40985 : }
40986 : break;
40987 : }
40988 : }
40989 : #endif
40990 : if ((sizeof(npy_uint64) <= sizeof(long))) {
40991 : __PYX_VERIFY_RETURN_INT_EXC(npy_uint64, long, PyLong_AsLong(x))
40992 : #ifdef HAVE_LONG_LONG
40993 : } else if ((sizeof(npy_uint64) <= sizeof(PY_LONG_LONG))) {
40994 : __PYX_VERIFY_RETURN_INT_EXC(npy_uint64, PY_LONG_LONG, PyLong_AsLongLong(x))
40995 : #endif
40996 : }
40997 : }
40998 : {
40999 : npy_uint64 val;
41000 : int ret = -1;
41001 : #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
41002 : Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
41003 : x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
41004 : if (unlikely(bytes_copied == -1)) {
41005 : } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
41006 : goto raise_overflow;
41007 : } else {
41008 : ret = 0;
41009 : }
41010 : #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
41011 : int one = 1; int is_little = (int)*(unsigned char *)&one;
41012 : unsigned char *bytes = (unsigned char *)&val;
41013 : ret = _PyLong_AsByteArray((PyLongObject *)x,
41014 : bytes, sizeof(val),
41015 : is_little, !is_unsigned);
41016 : #else
41017 : PyObject *v;
41018 : PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
41019 : int bits, remaining_bits, is_negative = 0;
41020 : int chunk_size = (sizeof(long) < 8) ? 30 : 62;
41021 : if (likely(PyLong_CheckExact(x))) {
41022 : v = __Pyx_NewRef(x);
41023 : } else {
41024 : v = PyNumber_Long(x);
41025 : if (unlikely(!v)) return (npy_uint64) -1;
41026 : assert(PyLong_CheckExact(v));
41027 : }
41028 : {
41029 : int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
41030 : if (unlikely(result < 0)) {
41031 : Py_DECREF(v);
41032 : return (npy_uint64) -1;
41033 : }
41034 : is_negative = result == 1;
41035 : }
41036 : if (is_unsigned && unlikely(is_negative)) {
41037 : Py_DECREF(v);
41038 : goto raise_neg_overflow;
41039 : } else if (is_negative) {
41040 : stepval = PyNumber_Invert(v);
41041 : Py_DECREF(v);
41042 : if (unlikely(!stepval))
41043 : return (npy_uint64) -1;
41044 : } else {
41045 : stepval = v;
41046 : }
41047 : v = NULL;
41048 : val = (npy_uint64) 0;
41049 : mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
41050 : shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
41051 : for (bits = 0; bits < (int) sizeof(npy_uint64) * 8 - chunk_size; bits += chunk_size) {
41052 : PyObject *tmp, *digit;
41053 : long idigit;
41054 : digit = PyNumber_And(stepval, mask);
41055 : if (unlikely(!digit)) goto done;
41056 : idigit = PyLong_AsLong(digit);
41057 : Py_DECREF(digit);
41058 : if (unlikely(idigit < 0)) goto done;
41059 : val |= ((npy_uint64) idigit) << bits;
41060 : tmp = PyNumber_Rshift(stepval, shift);
41061 : if (unlikely(!tmp)) goto done;
41062 : Py_DECREF(stepval); stepval = tmp;
41063 : }
41064 : Py_DECREF(shift); shift = NULL;
41065 : Py_DECREF(mask); mask = NULL;
41066 : {
41067 : long idigit = PyLong_AsLong(stepval);
41068 : if (unlikely(idigit < 0)) goto done;
41069 : remaining_bits = ((int) sizeof(npy_uint64) * 8) - bits - (is_unsigned ? 0 : 1);
41070 : if (unlikely(idigit >= (1L << remaining_bits)))
41071 : goto raise_overflow;
41072 : val |= ((npy_uint64) idigit) << bits;
41073 : }
41074 : if (!is_unsigned) {
41075 : if (unlikely(val & (((npy_uint64) 1) << (sizeof(npy_uint64) * 8 - 1))))
41076 : goto raise_overflow;
41077 : if (is_negative)
41078 : val = ~val;
41079 : }
41080 : ret = 0;
41081 : done:
41082 : Py_XDECREF(shift);
41083 : Py_XDECREF(mask);
41084 : Py_XDECREF(stepval);
41085 : #endif
41086 : if (unlikely(ret))
41087 : return (npy_uint64) -1;
41088 : return val;
41089 : }
41090 : raise_overflow:
41091 : PyErr_SetString(PyExc_OverflowError,
41092 : "value too large to convert to npy_uint64");
41093 : return (npy_uint64) -1;
41094 0 : raise_neg_overflow:
41095 0 : PyErr_SetString(PyExc_OverflowError,
41096 : "can't convert negative value to npy_uint64");
41097 0 : return (npy_uint64) -1;
41098 : }
41099 :
41100 : /* CIntToPy */
41101 0 : static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
41102 : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
41103 : #pragma GCC diagnostic push
41104 : #pragma GCC diagnostic ignored "-Wconversion"
41105 : #endif
41106 0 : const long neg_one = (long) -1, const_zero = (long) 0;
41107 : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
41108 : #pragma GCC diagnostic pop
41109 : #endif
41110 0 : const int is_unsigned = neg_one > const_zero;
41111 0 : if (is_unsigned) {
41112 : if (sizeof(long) < sizeof(long)) {
41113 : return PyInt_FromLong((long) value);
41114 : } else if (sizeof(long) <= sizeof(unsigned long)) {
41115 : return PyLong_FromUnsignedLong((unsigned long) value);
41116 : #ifdef HAVE_LONG_LONG
41117 : } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
41118 : return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
41119 : #endif
41120 : }
41121 : } else {
41122 0 : if (sizeof(long) <= sizeof(long)) {
41123 0 : return PyInt_FromLong((long) value);
41124 : #ifdef HAVE_LONG_LONG
41125 : } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
41126 : return PyLong_FromLongLong((PY_LONG_LONG) value);
41127 : #endif
41128 : }
41129 : }
41130 : {
41131 : unsigned char *bytes = (unsigned char *)&value;
41132 : #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
41133 : if (is_unsigned) {
41134 : return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
41135 : } else {
41136 : return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
41137 : }
41138 : #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
41139 : int one = 1; int little = (int)*(unsigned char *)&one;
41140 : return _PyLong_FromByteArray(bytes, sizeof(long),
41141 : little, !is_unsigned);
41142 : #else
41143 : int one = 1; int little = (int)*(unsigned char *)&one;
41144 : PyObject *from_bytes, *result = NULL;
41145 : PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
41146 : from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
41147 : if (!from_bytes) return NULL;
41148 : py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long));
41149 : if (!py_bytes) goto limited_bad;
41150 : order_str = PyUnicode_FromString(little ? "little" : "big");
41151 : if (!order_str) goto limited_bad;
41152 : arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
41153 : if (!arg_tuple) goto limited_bad;
41154 : if (!is_unsigned) {
41155 : kwds = PyDict_New();
41156 : if (!kwds) goto limited_bad;
41157 : if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
41158 : }
41159 : result = PyObject_Call(from_bytes, arg_tuple, kwds);
41160 : limited_bad:
41161 : Py_XDECREF(kwds);
41162 : Py_XDECREF(arg_tuple);
41163 : Py_XDECREF(order_str);
41164 : Py_XDECREF(py_bytes);
41165 : Py_XDECREF(from_bytes);
41166 : return result;
41167 : #endif
41168 : }
41169 : }
41170 :
41171 : /* CIntToPy */
41172 : static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_uint32(npy_uint32 value) {
41173 : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
41174 : #pragma GCC diagnostic push
41175 : #pragma GCC diagnostic ignored "-Wconversion"
41176 : #endif
41177 : const npy_uint32 neg_one = (npy_uint32) -1, const_zero = (npy_uint32) 0;
41178 : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
41179 : #pragma GCC diagnostic pop
41180 : #endif
41181 : const int is_unsigned = neg_one > const_zero;
41182 : if (is_unsigned) {
41183 : if (sizeof(npy_uint32) < sizeof(long)) {
41184 : return PyInt_FromLong((long) value);
41185 : } else if (sizeof(npy_uint32) <= sizeof(unsigned long)) {
41186 : return PyLong_FromUnsignedLong((unsigned long) value);
41187 : #ifdef HAVE_LONG_LONG
41188 : } else if (sizeof(npy_uint32) <= sizeof(unsigned PY_LONG_LONG)) {
41189 : return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
41190 : #endif
41191 : }
41192 : } else {
41193 : if (sizeof(npy_uint32) <= sizeof(long)) {
41194 : return PyInt_FromLong((long) value);
41195 : #ifdef HAVE_LONG_LONG
41196 : } else if (sizeof(npy_uint32) <= sizeof(PY_LONG_LONG)) {
41197 : return PyLong_FromLongLong((PY_LONG_LONG) value);
41198 : #endif
41199 : }
41200 : }
41201 : {
41202 : unsigned char *bytes = (unsigned char *)&value;
41203 : #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
41204 : if (is_unsigned) {
41205 : return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
41206 : } else {
41207 : return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
41208 : }
41209 : #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
41210 : int one = 1; int little = (int)*(unsigned char *)&one;
41211 : return _PyLong_FromByteArray(bytes, sizeof(npy_uint32),
41212 : little, !is_unsigned);
41213 : #else
41214 : int one = 1; int little = (int)*(unsigned char *)&one;
41215 : PyObject *from_bytes, *result = NULL;
41216 : PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
41217 : from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
41218 : if (!from_bytes) return NULL;
41219 : py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(npy_uint32));
41220 : if (!py_bytes) goto limited_bad;
41221 : order_str = PyUnicode_FromString(little ? "little" : "big");
41222 : if (!order_str) goto limited_bad;
41223 : arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
41224 : if (!arg_tuple) goto limited_bad;
41225 : if (!is_unsigned) {
41226 : kwds = PyDict_New();
41227 : if (!kwds) goto limited_bad;
41228 : if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
41229 : }
41230 : result = PyObject_Call(from_bytes, arg_tuple, kwds);
41231 : limited_bad:
41232 : Py_XDECREF(kwds);
41233 : Py_XDECREF(arg_tuple);
41234 : Py_XDECREF(order_str);
41235 : Py_XDECREF(py_bytes);
41236 : Py_XDECREF(from_bytes);
41237 : return result;
41238 : #endif
41239 : }
41240 : }
41241 :
41242 : /* CIntToPy */
41243 : static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_uint64(npy_uint64 value) {
41244 : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
41245 : #pragma GCC diagnostic push
41246 : #pragma GCC diagnostic ignored "-Wconversion"
41247 : #endif
41248 : const npy_uint64 neg_one = (npy_uint64) -1, const_zero = (npy_uint64) 0;
41249 : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
41250 : #pragma GCC diagnostic pop
41251 : #endif
41252 : const int is_unsigned = neg_one > const_zero;
41253 : if (is_unsigned) {
41254 : if (sizeof(npy_uint64) < sizeof(long)) {
41255 : return PyInt_FromLong((long) value);
41256 : } else if (sizeof(npy_uint64) <= sizeof(unsigned long)) {
41257 : return PyLong_FromUnsignedLong((unsigned long) value);
41258 : #ifdef HAVE_LONG_LONG
41259 : } else if (sizeof(npy_uint64) <= sizeof(unsigned PY_LONG_LONG)) {
41260 : return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
41261 : #endif
41262 : }
41263 : } else {
41264 : if (sizeof(npy_uint64) <= sizeof(long)) {
41265 : return PyInt_FromLong((long) value);
41266 : #ifdef HAVE_LONG_LONG
41267 : } else if (sizeof(npy_uint64) <= sizeof(PY_LONG_LONG)) {
41268 : return PyLong_FromLongLong((PY_LONG_LONG) value);
41269 : #endif
41270 : }
41271 : }
41272 : {
41273 : unsigned char *bytes = (unsigned char *)&value;
41274 : #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
41275 : if (is_unsigned) {
41276 : return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
41277 : } else {
41278 : return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
41279 : }
41280 : #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
41281 : int one = 1; int little = (int)*(unsigned char *)&one;
41282 : return _PyLong_FromByteArray(bytes, sizeof(npy_uint64),
41283 : little, !is_unsigned);
41284 : #else
41285 : int one = 1; int little = (int)*(unsigned char *)&one;
41286 : PyObject *from_bytes, *result = NULL;
41287 : PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
41288 : from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
41289 : if (!from_bytes) return NULL;
41290 : py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(npy_uint64));
41291 : if (!py_bytes) goto limited_bad;
41292 : order_str = PyUnicode_FromString(little ? "little" : "big");
41293 : if (!order_str) goto limited_bad;
41294 : arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
41295 : if (!arg_tuple) goto limited_bad;
41296 : if (!is_unsigned) {
41297 : kwds = PyDict_New();
41298 : if (!kwds) goto limited_bad;
41299 : if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
41300 : }
41301 : result = PyObject_Call(from_bytes, arg_tuple, kwds);
41302 : limited_bad:
41303 : Py_XDECREF(kwds);
41304 : Py_XDECREF(arg_tuple);
41305 : Py_XDECREF(order_str);
41306 : Py_XDECREF(py_bytes);
41307 : Py_XDECREF(from_bytes);
41308 : return result;
41309 : #endif
41310 : }
41311 : }
41312 :
41313 : /* ImportNumPyArray */
41314 3 : static PyObject* __Pyx__ImportNumPyArray(void) {
41315 3 : PyObject *numpy_module, *ndarray_object = NULL;
41316 3 : numpy_module = __Pyx_Import(__pyx_n_s_numpy, NULL, 0);
41317 3 : if (likely(numpy_module)) {
41318 3 : ndarray_object = PyObject_GetAttrString(numpy_module, "ndarray");
41319 3 : Py_DECREF(numpy_module);
41320 : }
41321 3 : if (unlikely(!ndarray_object)) {
41322 0 : PyErr_Clear();
41323 : }
41324 3 : if (unlikely(!ndarray_object || !PyObject_TypeCheck(ndarray_object, &PyType_Type))) {
41325 0 : Py_XDECREF(ndarray_object);
41326 0 : Py_INCREF(Py_None);
41327 : ndarray_object = Py_None;
41328 : }
41329 3 : return ndarray_object;
41330 : }
41331 1089 : static CYTHON_INLINE PyObject* __Pyx_ImportNumPyArrayTypeIfAvailable(void) {
41332 1089 : if (unlikely(!__pyx_numpy_ndarray)) {
41333 3 : __pyx_numpy_ndarray = __Pyx__ImportNumPyArray();
41334 : }
41335 1089 : Py_INCREF(__pyx_numpy_ndarray);
41336 1089 : return __pyx_numpy_ndarray;
41337 : }
41338 :
41339 : /* CIntFromPy */
41340 0 : static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
41341 : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
41342 : #pragma GCC diagnostic push
41343 : #pragma GCC diagnostic ignored "-Wconversion"
41344 : #endif
41345 0 : const long neg_one = (long) -1, const_zero = (long) 0;
41346 : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
41347 : #pragma GCC diagnostic pop
41348 : #endif
41349 0 : const int is_unsigned = neg_one > const_zero;
41350 : #if PY_MAJOR_VERSION < 3
41351 : if (likely(PyInt_Check(x))) {
41352 : if ((sizeof(long) < sizeof(long))) {
41353 : __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
41354 : } else {
41355 : long val = PyInt_AS_LONG(x);
41356 : if (is_unsigned && unlikely(val < 0)) {
41357 : goto raise_neg_overflow;
41358 : }
41359 : return (long) val;
41360 : }
41361 : }
41362 : #endif
41363 0 : if (unlikely(!PyLong_Check(x))) {
41364 0 : long val;
41365 0 : PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
41366 0 : if (!tmp) return (long) -1;
41367 0 : val = __Pyx_PyInt_As_long(tmp);
41368 0 : Py_DECREF(tmp);
41369 0 : return val;
41370 : }
41371 0 : if (is_unsigned) {
41372 : #if CYTHON_USE_PYLONG_INTERNALS
41373 : if (unlikely(__Pyx_PyLong_IsNeg(x))) {
41374 : goto raise_neg_overflow;
41375 : } else if (__Pyx_PyLong_IsCompact(x)) {
41376 : __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
41377 : } else {
41378 : const digit* digits = __Pyx_PyLong_Digits(x);
41379 : assert(__Pyx_PyLong_DigitCount(x) > 1);
41380 : switch (__Pyx_PyLong_DigitCount(x)) {
41381 : case 2:
41382 : if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) {
41383 : if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
41384 : __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
41385 : } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) {
41386 : return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
41387 : }
41388 : }
41389 : break;
41390 : case 3:
41391 : if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
41392 : if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
41393 : __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
41394 : } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) {
41395 : return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
41396 : }
41397 : }
41398 : break;
41399 : case 4:
41400 : if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
41401 : if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
41402 : __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
41403 : } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) {
41404 : return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
41405 : }
41406 : }
41407 : break;
41408 : }
41409 : }
41410 : #endif
41411 : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
41412 : if (unlikely(Py_SIZE(x) < 0)) {
41413 : goto raise_neg_overflow;
41414 : }
41415 : #else
41416 : {
41417 : int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
41418 : if (unlikely(result < 0))
41419 : return (long) -1;
41420 : if (unlikely(result == 1))
41421 : goto raise_neg_overflow;
41422 : }
41423 : #endif
41424 : if ((sizeof(long) <= sizeof(unsigned long))) {
41425 : __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
41426 : #ifdef HAVE_LONG_LONG
41427 : } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) {
41428 : __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
41429 : #endif
41430 : }
41431 : } else {
41432 : #if CYTHON_USE_PYLONG_INTERNALS
41433 0 : if (__Pyx_PyLong_IsCompact(x)) {
41434 0 : __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
41435 : } else {
41436 0 : const digit* digits = __Pyx_PyLong_Digits(x);
41437 0 : assert(__Pyx_PyLong_DigitCount(x) > 1);
41438 0 : switch (__Pyx_PyLong_SignedDigitCount(x)) {
41439 : case -2:
41440 0 : if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) {
41441 0 : if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
41442 0 : __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
41443 : } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
41444 : return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
41445 : }
41446 : }
41447 : break;
41448 : case 2:
41449 0 : if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) {
41450 0 : if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
41451 0 : __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
41452 : } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
41453 : return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
41454 : }
41455 : }
41456 : break;
41457 : case -3:
41458 : if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
41459 : if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
41460 : __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
41461 : } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
41462 : return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
41463 : }
41464 : }
41465 : break;
41466 : case 3:
41467 : if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
41468 : if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
41469 : __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
41470 : } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
41471 : return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
41472 : }
41473 : }
41474 : break;
41475 : case -4:
41476 : if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
41477 : if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
41478 : __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
41479 : } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
41480 : return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
41481 : }
41482 : }
41483 : break;
41484 : case 4:
41485 : if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
41486 : if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
41487 : __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
41488 : } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
41489 : return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
41490 : }
41491 : }
41492 : break;
41493 : }
41494 : }
41495 : #endif
41496 0 : if ((sizeof(long) <= sizeof(long))) {
41497 0 : __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
41498 : #ifdef HAVE_LONG_LONG
41499 : } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) {
41500 : __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
41501 : #endif
41502 : }
41503 : }
41504 : {
41505 : long val;
41506 : int ret = -1;
41507 : #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
41508 : Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
41509 : x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
41510 : if (unlikely(bytes_copied == -1)) {
41511 : } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
41512 : goto raise_overflow;
41513 : } else {
41514 : ret = 0;
41515 : }
41516 : #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
41517 : int one = 1; int is_little = (int)*(unsigned char *)&one;
41518 : unsigned char *bytes = (unsigned char *)&val;
41519 : ret = _PyLong_AsByteArray((PyLongObject *)x,
41520 : bytes, sizeof(val),
41521 : is_little, !is_unsigned);
41522 : #else
41523 : PyObject *v;
41524 : PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
41525 : int bits, remaining_bits, is_negative = 0;
41526 : int chunk_size = (sizeof(long) < 8) ? 30 : 62;
41527 : if (likely(PyLong_CheckExact(x))) {
41528 : v = __Pyx_NewRef(x);
41529 : } else {
41530 : v = PyNumber_Long(x);
41531 : if (unlikely(!v)) return (long) -1;
41532 : assert(PyLong_CheckExact(v));
41533 : }
41534 : {
41535 : int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
41536 : if (unlikely(result < 0)) {
41537 : Py_DECREF(v);
41538 : return (long) -1;
41539 : }
41540 : is_negative = result == 1;
41541 : }
41542 : if (is_unsigned && unlikely(is_negative)) {
41543 : Py_DECREF(v);
41544 : goto raise_neg_overflow;
41545 : } else if (is_negative) {
41546 : stepval = PyNumber_Invert(v);
41547 : Py_DECREF(v);
41548 : if (unlikely(!stepval))
41549 : return (long) -1;
41550 : } else {
41551 : stepval = v;
41552 : }
41553 : v = NULL;
41554 : val = (long) 0;
41555 : mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
41556 : shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
41557 : for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) {
41558 : PyObject *tmp, *digit;
41559 : long idigit;
41560 : digit = PyNumber_And(stepval, mask);
41561 : if (unlikely(!digit)) goto done;
41562 : idigit = PyLong_AsLong(digit);
41563 : Py_DECREF(digit);
41564 : if (unlikely(idigit < 0)) goto done;
41565 : val |= ((long) idigit) << bits;
41566 : tmp = PyNumber_Rshift(stepval, shift);
41567 : if (unlikely(!tmp)) goto done;
41568 : Py_DECREF(stepval); stepval = tmp;
41569 : }
41570 : Py_DECREF(shift); shift = NULL;
41571 : Py_DECREF(mask); mask = NULL;
41572 : {
41573 : long idigit = PyLong_AsLong(stepval);
41574 : if (unlikely(idigit < 0)) goto done;
41575 : remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1);
41576 : if (unlikely(idigit >= (1L << remaining_bits)))
41577 : goto raise_overflow;
41578 : val |= ((long) idigit) << bits;
41579 : }
41580 : if (!is_unsigned) {
41581 : if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1))))
41582 : goto raise_overflow;
41583 : if (is_negative)
41584 : val = ~val;
41585 : }
41586 : ret = 0;
41587 : done:
41588 : Py_XDECREF(shift);
41589 : Py_XDECREF(mask);
41590 : Py_XDECREF(stepval);
41591 : #endif
41592 : if (unlikely(ret))
41593 : return (long) -1;
41594 : return val;
41595 : }
41596 : raise_overflow:
41597 : PyErr_SetString(PyExc_OverflowError,
41598 : "value too large to convert to long");
41599 : return (long) -1;
41600 : raise_neg_overflow:
41601 : PyErr_SetString(PyExc_OverflowError,
41602 : "can't convert negative value to long");
41603 : return (long) -1;
41604 : }
41605 :
41606 : /* CIntFromPy */
41607 : static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *x) {
41608 : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
41609 : #pragma GCC diagnostic push
41610 : #pragma GCC diagnostic ignored "-Wconversion"
41611 : #endif
41612 : const char neg_one = (char) -1, const_zero = (char) 0;
41613 : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
41614 : #pragma GCC diagnostic pop
41615 : #endif
41616 : const int is_unsigned = neg_one > const_zero;
41617 : #if PY_MAJOR_VERSION < 3
41618 : if (likely(PyInt_Check(x))) {
41619 : if ((sizeof(char) < sizeof(long))) {
41620 : __PYX_VERIFY_RETURN_INT(char, long, PyInt_AS_LONG(x))
41621 : } else {
41622 : long val = PyInt_AS_LONG(x);
41623 : if (is_unsigned && unlikely(val < 0)) {
41624 : goto raise_neg_overflow;
41625 : }
41626 : return (char) val;
41627 : }
41628 : }
41629 : #endif
41630 : if (unlikely(!PyLong_Check(x))) {
41631 : char val;
41632 : PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
41633 : if (!tmp) return (char) -1;
41634 : val = __Pyx_PyInt_As_char(tmp);
41635 : Py_DECREF(tmp);
41636 : return val;
41637 : }
41638 : if (is_unsigned) {
41639 : #if CYTHON_USE_PYLONG_INTERNALS
41640 : if (unlikely(__Pyx_PyLong_IsNeg(x))) {
41641 : goto raise_neg_overflow;
41642 : } else if (__Pyx_PyLong_IsCompact(x)) {
41643 : __PYX_VERIFY_RETURN_INT(char, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
41644 : } else {
41645 : const digit* digits = __Pyx_PyLong_Digits(x);
41646 : assert(__Pyx_PyLong_DigitCount(x) > 1);
41647 : switch (__Pyx_PyLong_DigitCount(x)) {
41648 : case 2:
41649 : if ((8 * sizeof(char) > 1 * PyLong_SHIFT)) {
41650 : if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
41651 : __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
41652 : } else if ((8 * sizeof(char) >= 2 * PyLong_SHIFT)) {
41653 : return (char) (((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
41654 : }
41655 : }
41656 : break;
41657 : case 3:
41658 : if ((8 * sizeof(char) > 2 * PyLong_SHIFT)) {
41659 : if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
41660 : __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
41661 : } else if ((8 * sizeof(char) >= 3 * PyLong_SHIFT)) {
41662 : return (char) (((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
41663 : }
41664 : }
41665 : break;
41666 : case 4:
41667 : if ((8 * sizeof(char) > 3 * PyLong_SHIFT)) {
41668 : if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
41669 : __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
41670 : } else if ((8 * sizeof(char) >= 4 * PyLong_SHIFT)) {
41671 : return (char) (((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
41672 : }
41673 : }
41674 : break;
41675 : }
41676 : }
41677 : #endif
41678 : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
41679 : if (unlikely(Py_SIZE(x) < 0)) {
41680 : goto raise_neg_overflow;
41681 : }
41682 : #else
41683 : {
41684 : int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
41685 : if (unlikely(result < 0))
41686 : return (char) -1;
41687 : if (unlikely(result == 1))
41688 : goto raise_neg_overflow;
41689 : }
41690 : #endif
41691 : if ((sizeof(char) <= sizeof(unsigned long))) {
41692 : __PYX_VERIFY_RETURN_INT_EXC(char, unsigned long, PyLong_AsUnsignedLong(x))
41693 : #ifdef HAVE_LONG_LONG
41694 : } else if ((sizeof(char) <= sizeof(unsigned PY_LONG_LONG))) {
41695 : __PYX_VERIFY_RETURN_INT_EXC(char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
41696 : #endif
41697 : }
41698 : } else {
41699 : #if CYTHON_USE_PYLONG_INTERNALS
41700 : if (__Pyx_PyLong_IsCompact(x)) {
41701 : __PYX_VERIFY_RETURN_INT(char, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
41702 : } else {
41703 : const digit* digits = __Pyx_PyLong_Digits(x);
41704 : assert(__Pyx_PyLong_DigitCount(x) > 1);
41705 : switch (__Pyx_PyLong_SignedDigitCount(x)) {
41706 : case -2:
41707 : if ((8 * sizeof(char) - 1 > 1 * PyLong_SHIFT)) {
41708 : if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
41709 : __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
41710 : } else if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) {
41711 : return (char) (((char)-1)*(((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
41712 : }
41713 : }
41714 : break;
41715 : case 2:
41716 : if ((8 * sizeof(char) > 1 * PyLong_SHIFT)) {
41717 : if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
41718 : __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
41719 : } else if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) {
41720 : return (char) ((((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
41721 : }
41722 : }
41723 : break;
41724 : case -3:
41725 : if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) {
41726 : if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
41727 : __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
41728 : } else if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) {
41729 : return (char) (((char)-1)*(((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
41730 : }
41731 : }
41732 : break;
41733 : case 3:
41734 : if ((8 * sizeof(char) > 2 * PyLong_SHIFT)) {
41735 : if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
41736 : __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
41737 : } else if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) {
41738 : return (char) ((((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
41739 : }
41740 : }
41741 : break;
41742 : case -4:
41743 : if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) {
41744 : if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
41745 : __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
41746 : } else if ((8 * sizeof(char) - 1 > 4 * PyLong_SHIFT)) {
41747 : return (char) (((char)-1)*(((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
41748 : }
41749 : }
41750 : break;
41751 : case 4:
41752 : if ((8 * sizeof(char) > 3 * PyLong_SHIFT)) {
41753 : if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
41754 : __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
41755 : } else if ((8 * sizeof(char) - 1 > 4 * PyLong_SHIFT)) {
41756 : return (char) ((((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
41757 : }
41758 : }
41759 : break;
41760 : }
41761 : }
41762 : #endif
41763 : if ((sizeof(char) <= sizeof(long))) {
41764 : __PYX_VERIFY_RETURN_INT_EXC(char, long, PyLong_AsLong(x))
41765 : #ifdef HAVE_LONG_LONG
41766 : } else if ((sizeof(char) <= sizeof(PY_LONG_LONG))) {
41767 : __PYX_VERIFY_RETURN_INT_EXC(char, PY_LONG_LONG, PyLong_AsLongLong(x))
41768 : #endif
41769 : }
41770 : }
41771 : {
41772 : char val;
41773 : int ret = -1;
41774 : #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
41775 : Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
41776 : x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
41777 : if (unlikely(bytes_copied == -1)) {
41778 : } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
41779 : goto raise_overflow;
41780 : } else {
41781 : ret = 0;
41782 : }
41783 : #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
41784 : int one = 1; int is_little = (int)*(unsigned char *)&one;
41785 : unsigned char *bytes = (unsigned char *)&val;
41786 : ret = _PyLong_AsByteArray((PyLongObject *)x,
41787 : bytes, sizeof(val),
41788 : is_little, !is_unsigned);
41789 : #else
41790 : PyObject *v;
41791 : PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
41792 : int bits, remaining_bits, is_negative = 0;
41793 : int chunk_size = (sizeof(long) < 8) ? 30 : 62;
41794 : if (likely(PyLong_CheckExact(x))) {
41795 : v = __Pyx_NewRef(x);
41796 : } else {
41797 : v = PyNumber_Long(x);
41798 : if (unlikely(!v)) return (char) -1;
41799 : assert(PyLong_CheckExact(v));
41800 : }
41801 : {
41802 : int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
41803 : if (unlikely(result < 0)) {
41804 : Py_DECREF(v);
41805 : return (char) -1;
41806 : }
41807 : is_negative = result == 1;
41808 : }
41809 : if (is_unsigned && unlikely(is_negative)) {
41810 : Py_DECREF(v);
41811 : goto raise_neg_overflow;
41812 : } else if (is_negative) {
41813 : stepval = PyNumber_Invert(v);
41814 : Py_DECREF(v);
41815 : if (unlikely(!stepval))
41816 : return (char) -1;
41817 : } else {
41818 : stepval = v;
41819 : }
41820 : v = NULL;
41821 : val = (char) 0;
41822 : mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
41823 : shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
41824 : for (bits = 0; bits < (int) sizeof(char) * 8 - chunk_size; bits += chunk_size) {
41825 : PyObject *tmp, *digit;
41826 : long idigit;
41827 : digit = PyNumber_And(stepval, mask);
41828 : if (unlikely(!digit)) goto done;
41829 : idigit = PyLong_AsLong(digit);
41830 : Py_DECREF(digit);
41831 : if (unlikely(idigit < 0)) goto done;
41832 : val |= ((char) idigit) << bits;
41833 : tmp = PyNumber_Rshift(stepval, shift);
41834 : if (unlikely(!tmp)) goto done;
41835 : Py_DECREF(stepval); stepval = tmp;
41836 : }
41837 : Py_DECREF(shift); shift = NULL;
41838 : Py_DECREF(mask); mask = NULL;
41839 : {
41840 : long idigit = PyLong_AsLong(stepval);
41841 : if (unlikely(idigit < 0)) goto done;
41842 : remaining_bits = ((int) sizeof(char) * 8) - bits - (is_unsigned ? 0 : 1);
41843 : if (unlikely(idigit >= (1L << remaining_bits)))
41844 : goto raise_overflow;
41845 : val |= ((char) idigit) << bits;
41846 : }
41847 : if (!is_unsigned) {
41848 : if (unlikely(val & (((char) 1) << (sizeof(char) * 8 - 1))))
41849 : goto raise_overflow;
41850 : if (is_negative)
41851 : val = ~val;
41852 : }
41853 : ret = 0;
41854 : done:
41855 : Py_XDECREF(shift);
41856 : Py_XDECREF(mask);
41857 : Py_XDECREF(stepval);
41858 : #endif
41859 : if (unlikely(ret))
41860 : return (char) -1;
41861 : return val;
41862 : }
41863 : raise_overflow:
41864 : PyErr_SetString(PyExc_OverflowError,
41865 : "value too large to convert to char");
41866 : return (char) -1;
41867 : raise_neg_overflow:
41868 : PyErr_SetString(PyExc_OverflowError,
41869 : "can't convert negative value to char");
41870 : return (char) -1;
41871 : }
41872 :
41873 : /* FormatTypeName */
41874 : #if CYTHON_COMPILING_IN_LIMITED_API
41875 : static __Pyx_TypeName
41876 : __Pyx_PyType_GetName(PyTypeObject* tp)
41877 : {
41878 : PyObject *name = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
41879 : __pyx_n_s_name_2);
41880 : if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) {
41881 : PyErr_Clear();
41882 : Py_XDECREF(name);
41883 : name = __Pyx_NewRef(__pyx_n_s__56);
41884 : }
41885 : return name;
41886 : }
41887 : #endif
41888 :
41889 : /* CheckBinaryVersion */
41890 3 : static unsigned long __Pyx_get_runtime_version(void) {
41891 : #if __PYX_LIMITED_VERSION_HEX >= 0x030B00A4
41892 3 : return Py_Version & ~0xFFUL;
41893 : #else
41894 : const char* rt_version = Py_GetVersion();
41895 : unsigned long version = 0;
41896 : unsigned long factor = 0x01000000UL;
41897 : unsigned int digit = 0;
41898 : int i = 0;
41899 : while (factor) {
41900 : while ('0' <= rt_version[i] && rt_version[i] <= '9') {
41901 : digit = digit * 10 + (unsigned int) (rt_version[i] - '0');
41902 : ++i;
41903 : }
41904 : version += factor * digit;
41905 : if (rt_version[i] != '.')
41906 : break;
41907 : digit = 0;
41908 : factor >>= 8;
41909 : ++i;
41910 : }
41911 : return version;
41912 : #endif
41913 : }
41914 3 : static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) {
41915 3 : const unsigned long MAJOR_MINOR = 0xFFFF0000UL;
41916 3 : if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR))
41917 : return 0;
41918 0 : if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR)))
41919 : return 1;
41920 : {
41921 0 : char message[200];
41922 0 : PyOS_snprintf(message, sizeof(message),
41923 : "compile time Python version %d.%d "
41924 : "of module '%.100s' "
41925 : "%s "
41926 : "runtime version %d.%d",
41927 0 : (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF),
41928 : __Pyx_MODULE_NAME,
41929 : (allow_newer) ? "was newer than" : "does not match",
41930 0 : (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF)
41931 : );
41932 0 : return PyErr_WarnEx(NULL, message, 1);
41933 : }
41934 : }
41935 :
41936 : /* InitStrings */
41937 : #if PY_MAJOR_VERSION >= 3
41938 618 : static int __Pyx_InitString(__Pyx_StringTabEntry t, PyObject **str) {
41939 618 : if (t.is_unicode | t.is_str) {
41940 615 : if (t.intern) {
41941 459 : *str = PyUnicode_InternFromString(t.s);
41942 156 : } else if (t.encoding) {
41943 0 : *str = PyUnicode_Decode(t.s, t.n - 1, t.encoding, NULL);
41944 : } else {
41945 156 : *str = PyUnicode_FromStringAndSize(t.s, t.n - 1);
41946 : }
41947 : } else {
41948 3 : *str = PyBytes_FromStringAndSize(t.s, t.n - 1);
41949 : }
41950 618 : if (!*str)
41951 : return -1;
41952 618 : if (PyObject_Hash(*str) == -1)
41953 : return -1;
41954 : return 0;
41955 : }
41956 : #endif
41957 3 : static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
41958 621 : while (t->p) {
41959 : #if PY_MAJOR_VERSION >= 3
41960 618 : __Pyx_InitString(*t, t->p);
41961 : #else
41962 : if (t->is_unicode) {
41963 : *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
41964 : } else if (t->intern) {
41965 : *t->p = PyString_InternFromString(t->s);
41966 : } else {
41967 : *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
41968 : }
41969 : if (!*t->p)
41970 : return -1;
41971 : if (PyObject_Hash(*t->p) == -1)
41972 : return -1;
41973 : #endif
41974 618 : ++t;
41975 : }
41976 3 : return 0;
41977 : }
41978 :
41979 : #include <string.h>
41980 0 : static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) {
41981 0 : size_t len = strlen(s);
41982 0 : if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) {
41983 : PyErr_SetString(PyExc_OverflowError, "byte string is too long");
41984 : return -1;
41985 : }
41986 : return (Py_ssize_t) len;
41987 : }
41988 : static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
41989 : Py_ssize_t len = __Pyx_ssize_strlen(c_str);
41990 : if (unlikely(len < 0)) return NULL;
41991 : return __Pyx_PyUnicode_FromStringAndSize(c_str, len);
41992 : }
41993 : static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) {
41994 : Py_ssize_t len = __Pyx_ssize_strlen(c_str);
41995 : if (unlikely(len < 0)) return NULL;
41996 : return PyByteArray_FromStringAndSize(c_str, len);
41997 : }
41998 : static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
41999 : Py_ssize_t ignore;
42000 : return __Pyx_PyObject_AsStringAndSize(o, &ignore);
42001 : }
42002 : #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
42003 : #if !CYTHON_PEP393_ENABLED
42004 : static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
42005 : char* defenc_c;
42006 : PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
42007 : if (!defenc) return NULL;
42008 : defenc_c = PyBytes_AS_STRING(defenc);
42009 : #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
42010 : {
42011 : char* end = defenc_c + PyBytes_GET_SIZE(defenc);
42012 : char* c;
42013 : for (c = defenc_c; c < end; c++) {
42014 : if ((unsigned char) (*c) >= 128) {
42015 : PyUnicode_AsASCIIString(o);
42016 : return NULL;
42017 : }
42018 : }
42019 : }
42020 : #endif
42021 : *length = PyBytes_GET_SIZE(defenc);
42022 : return defenc_c;
42023 : }
42024 : #else
42025 : static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
42026 : if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
42027 : #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
42028 : if (likely(PyUnicode_IS_ASCII(o))) {
42029 : *length = PyUnicode_GET_LENGTH(o);
42030 : return PyUnicode_AsUTF8(o);
42031 : } else {
42032 : PyUnicode_AsASCIIString(o);
42033 : return NULL;
42034 : }
42035 : #else
42036 : return PyUnicode_AsUTF8AndSize(o, length);
42037 : #endif
42038 : }
42039 : #endif
42040 : #endif
42041 : static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
42042 : #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
42043 : if (
42044 : #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
42045 : __Pyx_sys_getdefaultencoding_not_ascii &&
42046 : #endif
42047 : PyUnicode_Check(o)) {
42048 : return __Pyx_PyUnicode_AsStringAndSize(o, length);
42049 : } else
42050 : #endif
42051 : #if (!CYTHON_COMPILING_IN_PYPY && !CYTHON_COMPILING_IN_LIMITED_API) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
42052 : if (PyByteArray_Check(o)) {
42053 : *length = PyByteArray_GET_SIZE(o);
42054 : return PyByteArray_AS_STRING(o);
42055 : } else
42056 : #endif
42057 : {
42058 : char* result;
42059 : int r = PyBytes_AsStringAndSize(o, &result, length);
42060 : if (unlikely(r < 0)) {
42061 : return NULL;
42062 : } else {
42063 : return result;
42064 : }
42065 : }
42066 : }
42067 5264 : static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
42068 5264 : int is_true = x == Py_True;
42069 5264 : if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
42070 2201 : else return PyObject_IsTrue(x);
42071 : }
42072 : static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
42073 : int retval;
42074 : if (unlikely(!x)) return -1;
42075 : retval = __Pyx_PyObject_IsTrue(x);
42076 : Py_DECREF(x);
42077 : return retval;
42078 : }
42079 0 : static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
42080 0 : __Pyx_TypeName result_type_name = __Pyx_PyType_GetName(Py_TYPE(result));
42081 : #if PY_MAJOR_VERSION >= 3
42082 0 : if (PyLong_Check(result)) {
42083 0 : if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
42084 : "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). "
42085 : "The ability to return an instance of a strict subclass of int is deprecated, "
42086 : "and may be removed in a future version of Python.",
42087 : result_type_name)) {
42088 0 : __Pyx_DECREF_TypeName(result_type_name);
42089 0 : Py_DECREF(result);
42090 0 : return NULL;
42091 : }
42092 : __Pyx_DECREF_TypeName(result_type_name);
42093 : return result;
42094 : }
42095 : #endif
42096 0 : PyErr_Format(PyExc_TypeError,
42097 : "__%.4s__ returned non-%.4s (type " __Pyx_FMT_TYPENAME ")",
42098 : type_name, type_name, result_type_name);
42099 0 : __Pyx_DECREF_TypeName(result_type_name);
42100 0 : Py_DECREF(result);
42101 : return NULL;
42102 : }
42103 258 : static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
42104 : #if CYTHON_USE_TYPE_SLOTS
42105 258 : PyNumberMethods *m;
42106 : #endif
42107 258 : const char *name = NULL;
42108 258 : PyObject *res = NULL;
42109 : #if PY_MAJOR_VERSION < 3
42110 : if (likely(PyInt_Check(x) || PyLong_Check(x)))
42111 : #else
42112 258 : if (likely(PyLong_Check(x)))
42113 : #endif
42114 0 : return __Pyx_NewRef(x);
42115 : #if CYTHON_USE_TYPE_SLOTS
42116 258 : m = Py_TYPE(x)->tp_as_number;
42117 : #if PY_MAJOR_VERSION < 3
42118 : if (m && m->nb_int) {
42119 : name = "int";
42120 : res = m->nb_int(x);
42121 : }
42122 : else if (m && m->nb_long) {
42123 : name = "long";
42124 : res = m->nb_long(x);
42125 : }
42126 : #else
42127 258 : if (likely(m && m->nb_int)) {
42128 258 : name = "int";
42129 258 : res = m->nb_int(x);
42130 : }
42131 : #endif
42132 : #else
42133 : if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
42134 : res = PyNumber_Int(x);
42135 : }
42136 : #endif
42137 258 : if (likely(res)) {
42138 : #if PY_MAJOR_VERSION < 3
42139 : if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
42140 : #else
42141 258 : if (unlikely(!PyLong_CheckExact(res))) {
42142 : #endif
42143 0 : return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
42144 : }
42145 : }
42146 0 : else if (!PyErr_Occurred()) {
42147 0 : PyErr_SetString(PyExc_TypeError,
42148 : "an integer is required");
42149 : }
42150 : return res;
42151 : }
42152 2178 : static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
42153 2178 : Py_ssize_t ival;
42154 2178 : PyObject *x;
42155 : #if PY_MAJOR_VERSION < 3
42156 : if (likely(PyInt_CheckExact(b))) {
42157 : if (sizeof(Py_ssize_t) >= sizeof(long))
42158 : return PyInt_AS_LONG(b);
42159 : else
42160 : return PyInt_AsSsize_t(b);
42161 : }
42162 : #endif
42163 2178 : if (likely(PyLong_CheckExact(b))) {
42164 : #if CYTHON_USE_PYLONG_INTERNALS
42165 2178 : if (likely(__Pyx_PyLong_IsCompact(b))) {
42166 2178 : return __Pyx_PyLong_CompactValue(b);
42167 : } else {
42168 0 : const digit* digits = __Pyx_PyLong_Digits(b);
42169 0 : const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b);
42170 0 : switch (size) {
42171 : case 2:
42172 0 : if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
42173 0 : return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
42174 : }
42175 : break;
42176 : case -2:
42177 0 : if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
42178 0 : return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
42179 : }
42180 : break;
42181 : case 3:
42182 : if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
42183 : return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
42184 : }
42185 : break;
42186 : case -3:
42187 : if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
42188 : return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
42189 : }
42190 : break;
42191 : case 4:
42192 : if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
42193 : return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
42194 : }
42195 : break;
42196 : case -4:
42197 : if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
42198 : return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
42199 : }
42200 : break;
42201 : }
42202 : }
42203 : #endif
42204 0 : return PyLong_AsSsize_t(b);
42205 : }
42206 0 : x = PyNumber_Index(b);
42207 0 : if (!x) return -1;
42208 0 : ival = PyInt_AsSsize_t(x);
42209 0 : Py_DECREF(x);
42210 : return ival;
42211 : }
42212 : static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
42213 : if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {
42214 : return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
42215 : #if PY_MAJOR_VERSION < 3
42216 : } else if (likely(PyInt_CheckExact(o))) {
42217 : return PyInt_AS_LONG(o);
42218 : #endif
42219 : } else {
42220 : Py_ssize_t ival;
42221 : PyObject *x;
42222 : x = PyNumber_Index(o);
42223 : if (!x) return -1;
42224 : ival = PyInt_AsLong(x);
42225 : Py_DECREF(x);
42226 : return ival;
42227 : }
42228 : }
42229 3057 : static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
42230 3057 : return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
42231 : }
42232 : static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
42233 : return PyInt_FromSize_t(ival);
42234 : }
42235 :
42236 :
42237 : /* #### Code section: utility_code_pragmas_end ### */
42238 : #ifdef _MSC_VER
42239 : #pragma warning( pop )
42240 : #endif
42241 :
42242 :
42243 :
42244 : /* #### Code section: end ### */
42245 : #endif /* Py_PYTHON_H */
|